Welcome to the Rover Runner! With this extension you can run your supergraph on your local machine using a mix of local and Apollo-based variant subgraphs
This extension let's you do the following:
- Run any subgraph locally normally or with the debugger
- Run any subgraph from a variant from Apollo Studio
- Set the environment variables required to run the subgraphs by hitting the gear icon
Make sure you have the Rover CLI installed! You can get this at: https://www.apollographql.com/docs/rover/getting-started
This extension requires a supergraph.json
file at .rover-runner/supergraph.json
with the following format:
{
"subgraphs": {
"Subgraph1": {
"path": "/Users/name/Desktop/repos/subgraph",
"localUrl": "http://localhost:3000/graphql"
},
"Subgraph2": {
"path": "subgraphs/subgraph2",
"localUrl": "http://localhost:3001/graphql"
},
"Subgraph3": {
"path": "subgraphs/subgraph3",
"localUrl": "http://localhost:3002/graphql",
"devUrl": "https://sampleendpointoverridingstudioconfig.com/graphql"
}
},
"supergraphs": {
"Supergraph1": ["Subgraph1", "Subgraph3"],
"Supergraph2": ["Subgraph2", "Subgraph3"]
}
}
Some notes about this format:
Subgraph1
,Subgraph2
, etc are the subgraph names and should match the names in Apollo Studiopath
is the path to the subgraph. It can either be a relative path from the workspace root like inSubgraph2
or an absolute path like inSubgraph1
.localUrl
is the graphQL endpoint when running the subgraph locallydevUrl
is the graphQL endpoint for the GraphQL variant. This field is optional as the extension will grab the endpoint from Apollo Studio by default
Lastly, this extension also requires a router.yaml
file at .rover-runner/router.yaml
.
- The
Run All
button sometimes has some concurrency issues - If you stop the first subgraph that you ran, then the whole router will shut down. This is an intentional behavior done by Rover and there is nothing we can do about it.
Add description to extension
README updated for open source
Open Source Release
Make sure the root folder in your workspace is rover-runner
or else you won't be able to debug the app
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.