Bikrant
Bikrant

Reputation: 75

Integrating apollo server v4 with NestJS

I tried using new @apollo/server with NestJS instead of apollo-server-express. While using apollo-server-express, the apollo-server-core package is automatically used and no error is thrown. But when I remove apollo-server-express and install @apollo/server as dependency. There is the error.

Error: Cannot find module 'apollo-server-core'

Does anyone have any solution ??

Upvotes: 1

Views: 2554

Answers (2)

SoraKumo
SoraKumo

Reputation: 1

A package for using Apollo Server 4 from NestJS is available here.
It works with both Express and Fastify.

Upvotes: -1

Jay McDoniel
Jay McDoniel

Reputation: 70412

There's no official support for Apollo Server v4 with @nestjs/graphql yet. You'd have to write a completely custom integration for that, or wait for this PR

Upvotes: 2

Related Questions