This repository contains course work from the Apollo Graph Developer - Associate Certification.
The original coursework has been adapted to include helper scripts for running the Apollo router and publishing subgraphs. Additionally, the repository has been transformed into a pnpm workspace with the following packages:
routersubgraph-locationssubgraph-reviewsclient
install the Apollo router binary in the router package folder
cd ./packages/router & curl -sSL https://router.apollo.dev/download/nix/latest | shsignup for an Apollo Studio Account create env file from sample file and add Apollo env vars
APOLLO_KEY=<APOLLO_KEY> APOLLO_GRAPH_REF=<APOLLO_GRAPH_REF>You can run the following scripts using the pnpm command:
-
Start Router:
pnpm run start-router
This will start the Apollo router using the script located at
scripts/start-router.js. -
Publish Locations Subgraph:
pnpm run publish-locations
This will publish the locations subgraph using the script located at
scripts/publish-locations.js. -
Publish Reviews Subgraph:
pnpm run publish-reviews
This will publish the reviews subgraph using the script located at
scripts/publish-reviews.js. -
Publish All Subgraphs:
pnpm run publish-all
This will publish both the locations and reviews subgraphs.
The project uses the following key dependencies:
-
Development Dependencies:
dotenv-cli:^7.3.0
-
Regular Dependencies:
dotenv:^16.3.1