gatsbyjs/gatsby · error

GraphQL Resolver ${resolverName}got called without "context"

Error message

GraphQL Resolver ${resolverName}got called without "context" argument. This might cause unexpected errors.

It's likely that this has happened in a schemaCustomization with manually invoked resolver. If manually invoking resolvers, it's best to invoke them as follows:

  resolve(parent, args, context, info)

What it means

Error "GraphQL Resolver ${resolverName}got called without "context" argument. This might cause unexpected errors. It's likely that this has happened in a schemaCustomization with manually invoked resolver. If manually invoking resolvers, it's best to invoke them as follows: resolve(parent, args, context, info) " thrown in gatsbyjs/gatsby.

Source

Thrown at packages/gatsby/src/schema/resolvers.ts:733

  //       it does not return a promise and this makes a significant difference at scale.
  //       GraphQL will gracefully handle the resolver result of a promise or non-promise.

  if (resolver[`isTracingResolver`]) {
    return resolver
  }

  const wrappedTracingResolver = function wrappedTracingResolver(
    parent,
    args,
    context,
    info
  ): Promise<any> {
    if (!WARNED_ABOUT_RESOLVERS) {
      if (!info) {
        reporter.warn(badResolverInvocationMessage(`info`))
        WARNED_ABOUT_RESOLVERS = true
      } else if (!context) {
        reporter.warn(badResolverInvocationMessage(`context`, info.path))
        WARNED_ABOUT_RESOLVERS = true
      }
    }

    let activity
    let time
    if (context?.tracer) {
      activity = context.tracer.createResolverActivity(
        info.path,
        `${info.parentType.name}.${info.fieldName}`
      )
      activity.start()
    }
    if (context?.telemetryResolverTimings) {
      time = process.hrtime.bigint()
    }

    const result = resolver(parent, args, context, info)

View on GitHub (pinned to e85d62f177)

Solutions

  1. When manually invoking resolvers, pass all four arguments: resolve(parent, args, context, info)
  2. Obtain context/info from the graphql function in schemaCustomization rather than constructing calls by hand
  3. Use Gatsby's resolver-wrapping utilities so the GraphQL runtime supplies context and info automatically
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby/src/schema/resolvers.ts:733 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26). Data as JSON: /api/errors/47d3fa41125e0c69. Report an issue: GitHub.