Overview
In the Lift-off series we built a complete Catstronauts application from the ground up. If you completed Lift-off using Apollo Server 3, or if you're just curious about how to upgrade to Apollo Server 4, you're in the right place!
This side quest explores how to take a Catstronauts app running on Apollo Server 3 and upgrade it to the latest and greatest of Apollo Server 4. Let's jump in!
Prerequisites
Before completing this side quest, you should already be comfortable with the concepts in the Lift-off series, including:
- Using Apollo Server to create a GraphQL backend
- Using Apollo Client to connect a frontend app to a GraphQL server
- Using GraphOS Studio to query a locally running GraphQL server
You should also be comfortable using the command line to navigate between directories, run commands, and use basic Git operations.
Catstronauts return!
Let's get right into the code. Navigate to a directory of your choice and run the following command to clone the repository we'll be working with.
Note: If you completed the Lift-off series using AS3, you are welcome to use your own local repository to walk through the AS4 migration steps.
git clone https://github.com/apollographql/odyssey-lift-off-part5-server.git
First, we'll get things up and running. Navigate to the root directory, and run the following command to install our current dependencies and launch the server.
npm install && npm start
npm install; npm start
Shortly after, we'll see a message that our server is running on http://localhost:4000. Opening this up in the browser, we'll see the landing page with a Query your server button.
Clicking into Sandbox, we'll find that our server is ready to query.
Copy the following query and try it out!
query GetTrackTitles {tracksForHome {title}}
Our project contains everything we built throughout the Lift-off series, but the server is still running on Apollo Server 3. We'll start the next lesson by updating our dependencies.
Share your questions and comments about this lesson
Your feedback helps us improve! If you're stuck or confused, let us know and we'll help you out. All comments are public and must follow the Apollo Code of Conduct. Note that comments that have been resolved or addressed may be removed.
You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.