Lesson

Use the GraphQL Context Argument to Get Authorization Information

GraphQL resolvers have an argument called "context" which is shared between resolvers and can be used to store authorization information, database connection information, and more. Learn how to use the context argument to get authorization information from a...

Duration
5 min
Access
Free
Transcript
Available

GraphQL resolvers have an argument called "context" which is shared between resolvers and can be used to store authorization information, database connection information, and more. Learn how to use the context argument to get authorization information from a JSON Web Token. Use the authorization information to scope the data sent back in the resolver to that which belongs to the requesting user.