Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apollo-server-express fails to resolve graphql 16 using yarn PnP #6269

Closed
evanrlong opened this issue Mar 29, 2022 · 3 comments · Fixed by #6273
Closed

apollo-server-express fails to resolve graphql 16 using yarn PnP #6269

evanrlong opened this issue Mar 29, 2022 · 3 comments · Fixed by #6273

Comments

@evanrlong
Copy link

evanrlong commented Mar 29, 2022

I am trying to use apollo-server-express in a project using yarn 3 w/ PlugNPlay dependency resolution. When I run yarn add apollo-server-express inside my project, I expect it to include the package without errors. Instead, I see this...

output

And running yarn explain peer-requirements <hash> yields...

explain

The problematic area seems to be an incorrect peerDependency inside @apollographql/apollo-tools@0.5.2. Strangely, that package does not seem to have any listed peerDependencies, so I'm a bit stumped.

Here is a minimal reproduction...

https://github.com/evanrlong/graphql-16-resolution-example

Could someone please take a look so that we can use graphql@16.x and apollo-server-express within yarn projects? Thanks!

@evanrlong evanrlong changed the title apollo-server-express fails to resolve grap apollo-server-express fails to resolve graphql 16 using yarn PnP Mar 29, 2022
@arcanis
Copy link
Contributor

arcanis commented Mar 29, 2022

Yarn hardcodes the peer dependency because graphql-tools forgot to do it; a PR is open here but it hasn't been merged yet.

@glasser
Copy link
Member

glasser commented Mar 29, 2022

thanks. apollo-tooling has been deprecated for a while and we are working to remove the vestigial uses of it in Apollo Server as part of our AS4 work. but we should probably fix the apollo-tools peer dep for now, since it is a dependency of AS even if it's only used by one particular modules option.

@glasser
Copy link
Member

glasser commented Mar 29, 2022

(cc @trevor-scheer who's been working on removing dependencies on the old tooling repo across our active projects)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants