What is the order of execution for context and auth scope functions? #1183
Unanswered
aarontravass
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I don't know when or how extractContext is used. authScopes are run when the resolver for the first field using the authScope is run. If you have a function that runs before the context object is created, it will run before any authScopes |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Say I have a function
extractContext
which takes the auth token as an argument and populates the context with the relevant user data. Moreover, I have an auth scope,verifyUser
which also takes the auth token as an argument and verifies the validity of the jwt. Which function is run first?Beta Was this translation helpful? Give feedback.
All reactions