prismake / typegql

Create GraphQL schema with TypeScript classes.
https://prismake.github.io/typegql/
MIT License
424 stars 21 forks source link

Remove @Guard decorator #15

Closed pie6k closed 6 years ago

pie6k commented 6 years ago

As @Guard decorator is in fact normal @Before hook that simply throws error or not, I'd consider it not needed abstraction that might be useless and confusing for some people use-cases.

It would be also very easy to create custom 'Guard' with 'Before' hook without any limitations coming from abstraction layer.

Reference: https://github.com/prismake/typegql/blob/df69cd8a95d6b671decc65aa3b3e2e383fa85a5f/src/domains/hooks/index.ts#L35

pie6k commented 6 years ago

It's published in version 0.4.0