This is a work-in-progress repo and small part of the Apollo Solutions build-a-supergraph workshop.
Please watch the main repo for any updates and official releases.
The code in this repository is experimental and has been provided for reference purposes only. Community feedback is welcome but this project may not be supported in the same way that repositories in the official Apollo GraphQL GitHub organization are. If you need help you can file an issue on this repository, contact Apollo to talk to an expert, or create a ticket directly in Apollo Studio.
To get the subgraph running locally please do the following steps:
npm install
npm run build
At this point you should be able to run npm run start
to run the server locally.
When doing changes locally npm run watch
will watch both the server and the TypeScript files.
Please follow the fowling steps to build and run this though docker:
docker build . -t ghcr.io/GITHUB_USER_NAME/subgraph-a
- build commanddocker run -p 4000:4000 --name subgraph-a -t ghcr.io/GITHUB_USER_NAME/subgraph-a
- run command
This repo is set up with Open Telemetry traces. Please add or change the variable of OTEL_HTTP_ENDPOINT
in the .env
file.
- Make sure your docker image is public. If its not public the deploy will fail because it wont be able to pull the image.
- Please update the repo name in
deploy/subgraph-a/values.yaml
on line 4.
Hygen is used to replace lines in fields to create new charts and such. Basically allows you to create subgraph-x.