context
Context (ctx
) argument of a response resolver contains a set of response transformers to compose a mocked response.
Request handler specificity
Context functions are specific to the request handler being used. For example, you cannot access the ctx.data()
method when using rest.*
request handlers, because it's specific to GraphQL API and is available only in the graphql.*
handlers.