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
Hello. Forgive me for my bad english.
I'm trying to implement authentication and authorization in my graphql api. If I use 👍
const customAuth = AuthDirective({ authenticateFunc: () => { throw new AuthenticationError('Invalid token!'); } }); const server = new ApolloServer({ typeDefs, resolvers, schemaDirectives: { ...customAuth } });
It's working. But I'm trying to use a custom function:
const server = new ApolloServer({ typeDefs, resolvers, schemaDirectives: { auth: customAuth().isAuthenticated } });
The results is:
TypeError: customAuth is not a function
If I replace by
auth: customAuth.isAuthenticated
The directive is not working at all, but no error in console.
Any idea please ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello. Forgive me for my bad english.
I'm trying to implement authentication and authorization in my graphql api. If I use 👍
It's working. But I'm trying to use a custom function:
The results is:
If I replace by
The directive is not working at all, but no error in console.
Any idea please ?
The text was updated successfully, but these errors were encountered: