This is a very basic example of the federation. It is not meant to be used in production.
If you're looking for a complete ready-to-use Open Source Router for Federation, have a look at the Cosmo Router which is based on this engine library.
This example includes three services:
accountsproductsreviews
Services defines a few queries and subscriptions.
- Install go modules
go mod download- Run start script
chmod +x start.sh
./start.sh
- To change subgraphs
- edit corresponding
<service>/graph/schema.graphqlsfile - run
go generate ./... - compose a new config via
compose.sh