Skip to main content

createContext

Admin Docs


Function: createContext()

createContext(initialContext): Promise<ExplicitGraphQLContext>

Defined in: src/routes/graphql.ts:50

This function is used to create the explicit context passed to the graphql resolvers each time they resolve a graphql operation at runtime. All the transport protocol specific information should be dealt with within this function and the return type of this function must be transport protocol agnostic.

Parameters

initialContext

InitialContext

Returns

Promise<ExplicitGraphQLContext>