Fabian

Results 5 comments of Fabian

> > > I think Authorization could be handled in different way. > Try having a look at: https://github.com/maticzav/graphql-shield This looks like an extensive library...great to know that it exists,...

> > > Try to use `rp.beforeQuery` here is a small test case: > https://github.com/graphql-compose/graphql-compose-mongoose/blob/a880f3eaa9f33f337539d80879157e8b89e92864/src/__tests__/github_issues/219-test.js > > Feel free to extend it as you wish. Thanks for the test case!...

Ok, so I found the mistake which prevented the error from being forwarded: Errors thrown inside the Mongoose callback scope will not be caught by GraphQL. The solution: Create an...

@nodkz Is there a way of accessing the Mongoose document(s) of a query (and skip it = dont return some or throw an error in specific cases) before returning it?

The reason why I'm asking is because I've found a (potential) way of handling permissions with more flexibility. Permissions to a specific document are defined by its property values. For...