Create the Codespace
GraphQL 102 runs in a new Codespace, separate from the one you used in 101. It starts with the finished 101 API: policies, policyholders, and claims, with every 101 exercise already done. You don’t need to bring over any of your 101 work.
The code is tidied up a little compared with what you wrote in 101. The [RESOLVER] and [LOADER] log lines are gone, and some comments are shorter, but everything works the same way.
✏️ Click the button below to create a Codespace:
✏️ Confirm these options, then click Create codespace:
| Option | Value |
|---|---|
| Repository | bitovi/graphql-and-kafka-workshop |
| Branch | main |
| Dev container configuration | GraphQL 102 |
| Region | East US or West US |
| Machine type | 2-core |
✏️ Once the Codespace finishes loading, start the API by running this in its terminal:
cd services/policies && npm run dev
You should see:
🚀 Policies service ready at http://0.0.0.0:4001/
Codespaces opens port 4001 in a new browser tab, showing Apollo Sandbox. If the tab doesn’t open, open the Ports tab in the Codespace and click the globe icon next to port 4001.
Leave the server running while you work through the course. It restarts on its own when you save a change.
When you take a break
GitHub charges Codespaces use by the hour while a Codespace is running, and personal accounts get a free amount each month. A Codespace stops on its own after 30 minutes without activity, unless you’ve changed that setting. To stop it sooner, see Stopping and starting a codespace. Your changes are kept, and you can start it again from the same page.
A stopped Codespace still counts toward your Codespaces storage, which GitHub also bills. When you finish the course, delete the Codespace from github.com/codespaces.
Next steps
Next, we’ll look at the policyholders, policies, and claims the API starts with.