Skip to content

An auth example that uses directives. #392

Answered by enisdenjo
mikecann asked this question in Q&A
Discussion options

You must be logged in to vote

Auth directives is framework/implementor schema specific feature, not a part of graphql-ws which is just a transport library.

You can use the context hook to populate the GraphQL context with whatever you please and leverage the auth directives within your schema implementation. I also recommend taking a look at graphql-shield.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikecann
Comment options

Answer selected by enisdenjo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #389 on August 30, 2022 11:31.