Using Context
Learn how to provide a context to a GraphQL Schema using Sofa. Use a factory function or pass data directly to create your context object. #GraphQL #Sofa
Here’s how you provide a context to a GraphQL Schema.
Using a Function
Sofa allows to build a context object through a factory function. You get an access to a request object through the req field.
Using an Object
You can also pass any data, directly, without using a function.