1. Introduction
1m

Overview

In the Lift-off series we built a complete Catstronauts application from the ground up. If you completed Lift-off using 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 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 to create a backend
  • Using to connect a frontend app to a
  • Using to a locally running

You should also be comfortable using the command line to navigate between directories, run commands, and use basic Git .

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
Task!

First, we'll get things up and running. Navigate to the root directory, and run the following command to install our current dependencies and the server.

On MacOS/Linux
npm install && npm start
On Windows
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.

http://localhost:4000
The landing page for our locally running server, showing a Query your server button that takes us to Sandbox

Clicking into Sandbox, we'll find that our server is ready to .

Copy the following and try it out!

query GetTrackTitles {
tracksForHome {
title
}
}
http://localhost:4000
The Sandbox Explorer, showing a GetTrackTitles query and the data we get back when we run it

Our project contains everything we built throughout the Lift-off series, but the server is still running on 3. We'll start the next lesson by updating our dependencies.

Next

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.