kkemple / graphql-auth

🔒 GraphQL authentication and authorization middleware
MIT License
278 stars 19 forks source link

Missing argument for resolver #6

Closed swissspidy closed 7 years ago

swissspidy commented 7 years ago

Dev setup:

I am using graphql-auth with:

What you did:

I set up a small API with express and mongoose for storage. When running a GraphQL query, I only want to fetch the fields from the database that are actually queried. I rely on the fourth argument passed to a resolver (info) to do this.

See https://github.com/graphql/graphql-js/issues/799 for the arguments a resolver receives.

What happened:

Since withAuth() doesn't pass on the fourth argument to the callback, I cannot do access it (it's undefined).

kkemple commented 7 years ago

thanks for opening this issue! will look at your PR now