We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tried adding a directive to a field
type Article { id: ID! authorId: ID! authorName: String! articleName: String! link: String! @hasScope(scope: ["write:articles"]) review: Review }
...but it throws on oldResolve.call as it does not have a field.resolve.
oldResolve.call
field.resolve
graphql-auth/directives/index.js
Lines 68 to 72 in 8d47457
I'm not sure what would be appropriate here (have never built a graphql server before).
Made it work by making the following additions:
const {defaultFieldResolver} = require('graphql'); // ... let promise = oldResolve ? oldResolve.call(field, ...arguments) : defaultFieldResolver.call(field, ...arguments)
The text was updated successfully, but these errors were encountered:
const oldResolve = field.resolve || defaultFieldResolver;
@fc-io : shorten. :D
Sorry, something went wrong.
No branches or pull requests
Tried adding a directive to a field
...but it throws on
oldResolve.call
as it does not have afield.resolve
.graphql-auth/directives/index.js
Lines 68 to 72 in 8d47457
I'm not sure what would be appropriate here (have never built a graphql server before).
Made it work by making the following additions:
The text was updated successfully, but these errors were encountered: