-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
When following the NestJS GraphQL quick-start documentation, users encounter two different scenarios:
Using documented command: Running npm i @nestjs/graphql @nestjs/apollo @apollo/server@^4.12.2 graphql results in a complete installation failure with ERESOLVE dependency conflict errors.
Using latest Apollo Server: Running npm i @nestjs/graphql @nestjs/apollo @apollo/server graphql (which installs Apollo Server 5.x) succeeds but generates peer dependency warnings due to conflicts with the deprecated @apollo/server-plugin-landing-page-graphql-playground plugin.
Minimum reproduction code
https://github.com/egorio/nest-appolo-issue
Steps to reproduce
Scenario 1 - Documentation command fails:
- Create a new NestJS project
nest new bug-report - Follow the NestJS GraphQL quick-start documentation
- Run the documented installation command:
npm i @nestjs/graphql @nestjs/apollo @apollo/server@^4.12.2 graphql - Observe the ERESOLVE dependency conflict error
npm error ERESOLVE unable to resolve dependency tree
npm error Found: @apollo/server@4.12.2
npm error Could not resolve dependency:
npm error peer @apollo/server@"^5.0.0" from @nestjs/apollo@13.2.1
Scenario 2 - Latest Apollo causes warnings:
- Create a new NestJS project nest new bug-report`
- Run:
npm i @nestjs/graphql @nestjs/apollo @apollo/server graphql - Observe peer dependency warnings about @apollo/server-plugin-landing-page-graphql-playground
npm warn ERESOLVE overriding peer dependency
npm warn peer @apollo/server@"^4.0.0" from @apollo/server-plugin-landing-page-graphql-playground@4.0.1
npm warn Conflicting peer dependency: @apollo/server@4.12.2
npm error Found: @apollo/server@4.12.2
Expected behavior
- The documentation should provide the correct installation command that works without conflicts
npm i @nestjs/graphql @nestjs/apollo @apollo/server graphql - Remove references to the deprecated @apollo/server-plugin-landing-page-graphql-playground plugin
Package version
13.2.0
Graphql version
@nestjs/apollo: ^13.2.1
@apollo/server: ^5.0.0
NestJS version
11.0.1
Node.js version
24.8.0
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
This issue was likely introduced when @nestjs/apollo was updated to support Apollo 5 nestjs/graphql#3659 (see a comment) as well but the documentation wasn't updated accordingly