Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing argument for resolver #6

Closed
1 of 4 tasks
swissspidy opened this issue Oct 16, 2017 · 1 comment
Closed
1 of 4 tasks

Missing argument for resolver #6

swissspidy opened this issue Oct 16, 2017 · 1 comment

Comments

@swissspidy
Copy link
Contributor

Dev setup:

  • graphql-auth version: 0.1.2
  • node version: 8.7.0
  • mongoose version: 4.12.1

I am using graphql-auth with:

  • hapi
  • express
  • koa
  • other:

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 graphql/graphql-js#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
Copy link
Owner

kkemple commented Oct 16, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants