Closed swissspidy closed 7 years ago
graphql-auth
node
mongoose
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.
info
See https://github.com/graphql/graphql-js/issues/799 for the arguments a resolver receives.
Since withAuth() doesn't pass on the fourth argument to the callback, I cannot do access it (it's undefined).
withAuth()
undefined
thanks for opening this issue! will look at your PR now
Dev setup:
graphql-auth
version: 0.1.2node
version: 8.7.0mongoose
version: 4.12.1I 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'sundefined
).