If you wish to separate your server to smaller parts and deploy them as microservices, you can use GraphQL Modules in the way you are used to.
That means that you can still implement small servers and then use Schema Stitching to merge your small GraphQL schemas into a unified schema.
You can also use
PubSub to implement messaging mechanism between GraphQL Modules servers.
The default and built-in implementation of the
Since it's a very simple API, you can implement your own way of sending messages.
You can implement your own message transmitter by implementing
Make sure to use it in a
CommunicationModule to all other modules where you wish to use
Another useful trick is to use external PubSub services such as Redis PubSub.
You can easily create a
RedisPubSub this way:
PubSub can be replaced by other implementations.
The following are existing ready-to-use implementations: