Welcome to the companion app of Odyssey's Voyage II: Federating the Monolith! This is the server
backend of the Airlock app. You can find the course lessons and instructions on Odyssey, Apollo's learning platform.
You can preview the completed demo app here.
You can find the client counterpart here.
The course will walk you through step by step how to turn this monolithic graph into a federated graph. This codebase is the starting point of your journey!
To get started:
- Run
npm install
. - Run
npm start
.
This will start the GraphQL API server on http://localhost:4000
Next, let's run some local services.
- In a new terminal window, run
npm run launch
. This will run 4 local services, which you can learn about in the accompanying Odyssey course.
After playing around with the data, you may want to reset to its initial state. To do this, run npm run db:reset
.
You can take a peek at what the final version of the code should look like (after completing all the steps in the course).
To run the final
version:
- Run
npm install
in thefinal
directory. - Run
npm start
in thefinal
directory.
This will start the GraphQL API gateway on http://localhost:4000
Next, let's run the subgraphs we split off according to the course instructions: the monolith subgraph (what's left of it), the accounts subgraph and the listings subgraph.
- In a new terminal window, navigate to the root of the
final
directory, runnpm run start:monolith-subgraph
. - In a new terminal window, navigate to the
final/subgraph-accounts
directory, runnpm install
thennpm start
. - In a new terminal window, navigate to the
final/subgraph-listings
directory, runnpm install
thennpm start
.
Finally, let's run some local services.
- In a new terminal window, navigate to the
final
directory, then runnpm run launch
. This will run 4 local services, which you can learn about in the accompanying Odyssey course.
For any issues or problems concerning the course content, please refer to the Odyssey topic in our community forums.