nestjsx / nest-access-control

Role and Attribute based Access Control for Nestjs 🔐
MIT License
1.13k stars 78 forks source link

New graphql dependency is a braking change #65

Closed MiloszFilimowski closed 2 years ago

MiloszFilimowski commented 2 years ago

Hi! The new change introduced here https://github.com/nestjsx/nest-access-control/pull/63 Breaks exisitng projects, I'd suggest maybe using inline require so that it's only imported if needed? My project doesn't use graphql and I don't feel like adding it just to satisfy my pipeline. Thanks!

sstephant commented 2 years ago

Confirmed, it's in the devDependencies but not declared as a peerDependency since it's required at runtime https://github.com/nestjsx/nest-access-control/blob/95bbf21d34b7caf07a61dcbcca4ccbb3f37d4a00/src/decorators/user-roles.decorators.ts#L19

shekohex commented 2 years ago

Sure, we can declare it as peer dependencies. I'd be happy to accept a Quick small PR to fix that!