Skip to content

Commit d85878e

Browse files
authored
Merge pull request #59 from smyrick/gateway-2-example
Add simple static gateway example for debugging gateway issues
2 parents 4963722 + 5ba57cc commit d85878e

File tree

8 files changed

+4826
-1
lines changed

8 files changed

+4826
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22

33
**/dist
4-
**/__generated__
4+
**/__generated__
5+
**/.idea
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Getting started with Apollo Gateway v2
2+
3+
This is the complete code from [Implementing a gateway with Apollo Server](https://www.apollographql.com/docs/apollo-server/using-federation/apollo-gateway-setup).
4+
5+
## Run locally
6+
7+
```shell
8+
npm install
9+
npm start
10+
```
11+
12+
### Supergraph Schema
13+
The [supergraph schema file is static](https://www.apollographql.com/docs/apollo-server/using-federation/apollo-gateway-setup#composing-the-supergraph-schema) and fetched from the [Router example schema](https://www.apollographql.com/docs/router/quickstart#2-download-the-example-supergraph-schema).
14+
15+
See [our docs](https://www.apollographql.com/docs/apollo-server/using-federation/apollo-gateway-setup#nodejs-gateway-setup) on how to provide a supergraph with other methods.
16+
17+
## Run in CodeSandbox
18+
19+
<a href="https://codesandbox.io/s/github/apollographql/docs-examples/tree/main/apollo-gateway/v2/getting-started?fontsize=14&hidenavigation=1&theme=dark">
20+
<img alt="Edit gateway-getting-started" src="https://codesandbox.io/static/img/play-codesandbox.svg">
21+
</a>

0 commit comments

Comments
 (0)