nest-raven icon indicating copy to clipboard operation
nest-raven copied to clipboard

Install without GraphQL results in many warnings

Open vinnymac opened this issue 4 years ago • 1 comments

Summary

After adding nest-raven to a new project I am seeing a lot of new warnings when a project has no dependence on GraphQL.

See screenshot below.

Screen Shot 2021-01-10 at 11 36 26 PM

Any recommendations for working around this? I am aware that @nestjs/graphql is an optionalDependency, and yarn doesn't seem able to disable an optional dependency for a single package.

Perhaps another version of nest-raven could exist just for the GraphQL dependency? Such as nest-graphql-raven? I could see this repository containing multiple packages similar to others like babel, nestjs, react-router, etc do today.

vinnymac avatar Jan 11 '21 04:01 vinnymac

I'd suggest changing it to a peer dependency and mark it optional in peerDependenciesMeta

That way it will only use it if the parent module has it installed.

EDIT: According to this comment that wouldn't work as the module currently doesn't work without graphql.

grimurd avatar Jun 03 '21 10:06 grimurd