See setchy/apollo-server-4-mocked-federation for an Apollo Server 4.x example
This repository contains a example of how to mock a managed federation Supergraph schema with apollo-gateway powered by apollo-server version 3.x.
Note: Since we are using managed federation, the mocked schema is the Supergraph schema from your Apollo Studio Schema Registry.
- You already have an Apollo Studio organization / account
- At least one
subgraph
has been published to the schema registry for the below mentionedAPOLLO_KEY
andAPOLLO_GRAPH_REF
pair
cp .env.template .env
- Edit
.env
and set a validAPOLLO_KEY
andAPOLLO_GRAPH_REF
pair - Run
npm install && npm run dev