Company
Date Published
Author
Mark Roberts
Word count
1587
Language
English
Hacker News points
1

Summary

The authors of Propel, a product that uses GraphQL for in-product analytics and customer dashboards, recently migrated from Apollo Server 3 to Apollo Server 4. The migration process was not entirely smooth, with some unexpected differences between the two versions. Despite these challenges, the team was able to successfully upgrade their GraphQL API using various tools and techniques. They had to adapt to changes such as the removal of the `gql` template literal tag, the replacement of ApolloError with GraphQLError, and the shift from the `requestDidStart` method in plugins to the `context` function. Additionally, they had to modify their authentication and authorization plugin to work with the new version of Apollo Server. The team also changed their server setup by swapping to `expressMiddleware`, which allowed them to install a health check endpoint at a private URL. Overall, the migration process required careful planning and testing, but ultimately resulted in a more robust and scalable GraphQL API.