I recently delved into learning nestjs and decided to give this graphql example a try.
The issue I encountered is that the example was originally designed for apollo-server version 1, and I'm having difficulty adapting it to work with apollo-server version 2. I'm currently puzzled on how to integrate apollo-server version 2 into the consumer:
consumer
.apply(
graphiqlExpress({
endpointURL: '/graphql',
subscriptionsEndpoint: `ws://localhost:3001/subscriptions`,
}),
)
.forRoutes('/graphiql')
.apply(graphqlExpress(req => ({ schema, rootValue: req })))
.forRoutes('/graphql');
Could anyone provide some guidance on how to adapt this nestjs example to work with apollo-server version 2?