Prerequisites
Environment check
Browsers
No response
Reproduction repository
https://github.com/apollographql/graphql-testing-library
Reproduction steps
When installing msw, graphql is installed as a transitive dependency at v16. This goes against the expectation in the GraphQL ecosystem that graphql always be treated as a peer dependency: graphql/graphql-js#594 (comment)
From the graphql source:
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
This cannot be trivially overridden with all package managers (e.g. npm overrides has open issues), and causes surprising behavior.
Current behavior
graphql is a dependency of MSW.
Here's an example of a project using a number of packages that rely on graphql. All of them list it as a peer dependency with the range of 15 || 16, except for MSW.

The result is my MSW GraphQL handler returning errors about unsupported GraphQL features for a version of GraphQL I haven't installed and don't expect to be executing my queries:

Expected behavior
I'd expect MSW to treat it as a peer dependency.
Prerequisites
Environment check
mswversionBrowsers
No response
Reproduction repository
https://github.com/apollographql/graphql-testing-library
Reproduction steps
When installing
msw,graphqlis installed as a transitive dependency at v16. This goes against the expectation in the GraphQL ecosystem thatgraphqlalways be treated as a peer dependency: graphql/graphql-js#594 (comment)From the
graphqlsource:This cannot be trivially overridden with all package managers (e.g. npm overrides has open issues), and causes surprising behavior.
Current behavior
graphqlis a dependency of MSW.Here's an example of a project using a number of packages that rely on
graphql. All of them list it as a peer dependency with the range of 15 || 16, except for MSW.The result is my MSW GraphQL handler returning errors about unsupported GraphQL features for a version of GraphQL I haven't installed and don't expect to be executing my queries:

Expected behavior
I'd expect MSW to treat it as a peer dependency.