mercurius-js / mercurius-typescript

TypeScript usage examples and "mercurius-codegen" for Mercurius

Home Page:https://mercurius.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release with Mercurius 13 as a supported peer dependency?

mnito opened this issue · comments

Right now the current release of mercurius-codegen on NPM (5.0.3) does not support Mercurius 13 as a peer dependency, and leads to npm install warnings or errors like the following:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: <redacted>@1.0.0
npm WARN Found: mercurius@12.2.0
npm WARN node_modules/mercurius
npm WARN   peer mercurius@"^11.0.0 || ^12.0.0" from mercurius-codegen@5.0.3
npm WARN   node_modules/mercurius-codegen
npm WARN     mercurius-codegen@"^5.0.3" from the root project
npm WARN   1 more (the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer mercurius@"^11.0.0 || ^12.0.0" from mercurius-codegen@5.0.3
npm WARN node_modules/mercurius-codegen
npm WARN   mercurius-codegen@"^5.0.3" from the root project

or

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: mercurius-codegen@5.0.3
npm ERR! Found: mercurius@13.2.2
npm ERR! node_modules/mercurius
npm ERR!   mercurius@"^13.2.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer mercurius@"^11.0.0 || ^12.0.0" from mercurius-codegen@5.0.3
npm ERR! node_modules/mercurius-codegen
npm ERR!   mercurius-codegen@"^5.0.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: mercurius@12.2.0
npm ERR! node_modules/mercurius
npm ERR!   peer mercurius@"^11.0.0 || ^12.0.0" from mercurius-codegen@5.0.3
npm ERR!   node_modules/mercurius-codegen
npm ERR!     mercurius-codegen@"^5.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

--

While you can work around the installation issue by adding --force or --legacy-peer-deps to npm install, this is obviously not the ideal solution.

The main branch currently has Mercurius 13 as a peer dependency. Can we get a new release of mercurius-codegen published to NPM to resolve the peer dependency issues when using Mercurius 13?

@PabloSzx thoughts on this?

Any updates on this?

released 5.0.4 with mercurius v13 as peer dependency