You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With graphql-js v17 now stable, @elysiajs/graphql-yoga@1.4.1 can't be used in a v17 project. Two things in the current manifest block it:
// @elysiajs/graphql-yoga@1.4.1"dependencies": {
"graphql": "^16.6.0", // hard-pins consumers to graphql 16"graphql-yoga": "^3.9.1"// pulls in Yoga v3 (very old)
}
Because graphql is a regular dependency (not a peer), it can also install a secondgraphql runtime under the plugin even when the app already depends on graphql, producing the classic:
Cannot use GraphQLSchema "..." from another module or realm.
What this issue tracks
This is the umbrella for graphql-17 compatibility. It builds on two existing threads that each cover one piece but are currently unmerged:
Track upstream: full graphql-17 support ultimately depends on graphql-yoga itself adding a ^17 peer range (see graphql-hive/graphql-yoga). Once that lands, this package's peer/Yoga ranges can include it end-to-end.
Offer
Happy to open a PR combining the peer-dependency move and the Yoga v5 bump if that's a welcome direction.
Summary
With graphql-js v17 now stable,
@elysiajs/graphql-yoga@1.4.1can't be used in a v17 project. Two things in the current manifest block it:Because
graphqlis a regular dependency (not a peer), it can also install a secondgraphqlruntime under the plugin even when the app already depends ongraphql, producing the classic:What this issue tracks
This is the umbrella for graphql-17 compatibility. It builds on two existing threads that each cover one piece but are currently unmerged:
graphqlfromdependenciestopeerDependenciesgraphql-yogafrom3.9.1to5.xProposed changes
graphqltopeerDependencieswith a widened range, e.g.^16.6.0 || ^17.0.0(ref Make graphql a peer dependency to avoid duplicate runtimes #40/Make graphql a peer dependency #41). This fixes the duplicate-runtime error and lets the host app own thegraphqlversion.graphql-yogato^5(ref build(deps): bump graphql-yoga from 3.9.1 to 5.10.4 #39). v3 is several majors behind.graphql-yogaitself adding a^17peer range (see graphql-hive/graphql-yoga). Once that lands, this package's peer/Yoga ranges can include it end-to-end.Offer
Happy to open a PR combining the peer-dependency move and the Yoga v5 bump if that's a welcome direction.
Environment