Playground to test out Federated GraphQL.
Install the rover CLI:
curl -sSL https://rover.apollo.dev/nix/latest | sh
and the router itself:
curl -sSL https://router.apollo.dev/download/nix/latest | sh
and finally, we'll be using bun to speed up/simplify running our services:
curl -fsSL https://bun.sh/install | bash
You first start the three subgraphs:
$ cd service-users
$ bun install
$ bun dev
$ cd service-reviews
$ bun install
$ bun dev
$ cd service-products
$ bun install
$ bun dev
We can then compose our subgraphs:
$ rover supergraph compose --config ./supergraph-config.yaml > supergraph.graphql
And then start the router that pieces them together:
$ ./router --config router.yaml --supergraph=supergraph.graphql --dev --hot-reload