Migrating to v0.4
In version 0.4, Apollo Server has been renamed to GraphQL Server, to reduce confusion about its compatibility with other GraphQL-related packages and tools. In particular, the goal is to ensure people don’t get confused that Apollo Client only works with Apollo Server and the other way around.
Note: This guide assumes you were previously up to date with
0.3.x. If you are currently using
0.2.xor below, consult the previous migration guide.
Having all of Apollo Server in one npm package was causing some issues, particularly with TypeScript development. Starting with
0.4, the GraphQL Server is shipping as 3 different packages:
It has also been refactored to be more modular internally, but that doesn’t matter from a usage perspective.
Even though the code has been radically reorganized and many exports renamed, the functionality remains identical. At most, you will have to rename 2-4 variables and imports in your code.
If you were previously importing the server plugin from
apollo-server, you should now import from the server-specific package. Every part of the API that used to have the word
apollo in it now says
graphql. Read the details for your server below.
For TypeScript types:
The Connect server middleware is in the same package as the Express middleware.
Importing TypeScript types is the same as before.
apolloOptions parameter to the plugin has been renamed to