graphql-modules
graphql-modules copied to clipboard
Introduce Apollo v4 support & Drop Apollo v2/v3 and Node 16 support
Closes #2270
This PR also updates example with latest versions of GraphQL Yoga and Apollo Server. It also replaces deprecated Express GraphQL with the new GraphQL HTTP reference implementation.
First of all, I removed apollo executor and apollo schema creation. executor
is not available anymore in Apollo Server's constructor, so instead we create a gateway
instance to pass the schema and our executor. This happens in createApolloGateway
. Schema creation is not needed because Apollo doesn't handle subscriptions anymore.
Then I updated Apollo packages from apollo-server
to @apollo/server
in all tests, examples etc.
I also replaced Express GraphQL with GraphQL HTTP.
Then I updated GraphQL Yoga packages and its usage in the examples.