In the api side, you can get the context either from the:
- resolve args (GraphQL | RedwoodJS Docs)
- Importing the context: (GraphQL | RedwoodJS Docs)
The context in the resolver args has the RedwoodGraphQLContext
typing and the imported one has the GlobalContext type.
The RedwoodGraphQLContext
type has the event
and requestContext
properties while the GlobalContext
type only has the currentUser
property.
Is there a reason for 2 separate typings? They seem to be the same object