# Apollo v3 -> v4 This article is based on [Migrating to Apollo Server 4](https://www.apollographql.com/docs/apollo-server/migration/) and the current state of the alkemio-server. ## Apollo Server 4 supports Node.js 14.16.0 and later. Currently **alkemio-server** requires **16.15.0 or later**. ## Apollo Server 4 supports graphql v16.6.0 and later. **graphql 15.8.0** updated to **16.6.0**. ## If you use Apollo Server with TypeScript, you must use TypeScript v4.7.0 or newer. **Typescript 4.7.4** is installed which is the latest ** ** version. In addition, it has been overriden for **@nestjs/schematics@8.0.2**, because it depends on **Typescript 4.3.5**. ```json "@nestjs/schematics": { "typescript": "4.7.4" } ``` ## Migrate from apollo-server-express 1. Install the @apollo/server 1. Import symbols from @apollo/server (i.e., instead of from apollo-server-express and apollo-server-core). 1. Remove the Apollo Server 3 apollo-server-express and apollo-server-core packages. ## Apollo Server 4 removes both ApolloError and toApolloError in favor of using GraphQLError. **Everything which extended `ApolloError` now extends `GraphQLError` and uses the below 'new' constructor.** Old ```typescript super(error, code?.toLocaleString()); ``` New ```typescript super(error, { extensions: { code: code?.toLocaleString() }, }); ```