Migrate GraphQL to Apollo
On this page
Important
Always refer to the official documentation of both MongoDB Atlas and Apollo Server for the most up-to-date and accurate information. Specific steps may vary depending on the details of your project and the technologies used.
Apollo provides a developer platform and open-source tools and SDKs, including Apollo Server, to unify your data and services. Apollo Server is a spec-compliant, production-ready server library that can use data from any source, including MongoDB Atlas.
Migrating from MongoDB Atlas App Services to Apollo Server involves the following steps:
Create an Apollo Server
Apollo Server is an open-source GraphQL server that's compatible with any GraphQL client, including Apollo Client.
If you are using an Express server, follow along with this tutorial on how to add Apollo Server to an existing MERN stack project.
If you are starting from scratch, follow along with the Apollo Server quickstart tutorial. On Step 4, follow the docs for fetching data from MongoDB.
Be sure to update authorization and authentication. Refer to the Authentication and Authorization documentation for Apollo Server for details.
Shut Down Atlas App Services Endpoints
Once you have verified that your GraphQL API endpoints are fully migrated and operational on Apollo Server, you can delete your MongoDB Atlas App Services app to avoid unnecessary costs. As a reminder, Atlas GraphQL endpoints will no longer be supported beginning March 12, 2025.
Next Steps
Check out the Apollo Federation docs to learn how to build a federated architecture that combines multiple GraphQL APIs to create a unified supergraph.