gatsbyjs/gatsby · error

Types implementing queryable interfaces must also implement

Error message

Types implementing queryable interfaces must also implement the `Node` interface. Check the type definition of `${Array.from(incorrectTypes).map(t => `${t}`).join(`, `)}`.

What it means

Error "Types implementing queryable interfaces must also implement the `Node` interface. Check the type definition of `${Array.from(incorrectTypes).map(t => `${t}`).join(`, `)}`." thrown in gatsbyjs/gatsby.

Source

Thrown at packages/gatsby/src/schema/schema.js:1405

      queryableInterfaces.add(type.getTypeName())
    }
  })
  const incorrectTypes = new Set()
  schemaComposer.forEach(type => {
    if (type instanceof ObjectTypeComposer) {
      const interfaces = type.getInterfaces()
      if (
        interfaces.some(iface =>
          queryableInterfaces.has(iface.getTypeName())
        ) &&
        !type.hasInterface(`Node`)
      ) {
        incorrectTypes.add(type.getTypeName())
      }
    }
  })
  if (incorrectTypes.size) {
    report.panic(
      `Types implementing queryable interfaces must also implement the \`Node\` ` +
        `interface. Check the type definition of ` +
        `${Array.from(incorrectTypes)
          .map(t => `\`${t}\``)
          .join(`, `)}.`
    )
  }
}

const mergeFields = ({ typeComposer, fields }) =>
  Object.entries(fields).forEach(([fieldName, fieldConfig]) => {
    if (typeComposer.hasField(fieldName)) {
      typeComposer.extendField(fieldName, fieldConfig)
    } else {
      typeComposer.setField(fieldName, fieldConfig)
    }
  })

View on GitHub (pinned to e85d62f177)

Solutions

  1. Add the `Node` interface to each listed type's definition passed to createTypes
  2. Or stop making those types queryable (remove the queryable interface / searchable fields) so they are not pulled into queryAll types
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby/src/schema/schema.js:1405 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/795806d02029970e. Report an issue: GitHub.