IncompatibleDefinition

class IncompatibleDefinition(name: String, expectedDefinition: String, val sourceLocation: SourceLocation?) : GraphQLValidationIssue

The provided schema contains a definition that doesn't match the GraphQL specification.

This may happen in particular for directive that are in the process of being specified like @defer (as of Jul 2025).

Because the Apollo compiler expects a certain shape of directive and arguments, anything else may trigger a crash in the compiler. By validating explicitly, the error is more explicit.

Constructors

Link copied to clipboard
constructor(name: String, expectedDefinition: String, sourceLocation: SourceLocation?)

Properties

Link copied to clipboard
open override val message: String
Link copied to clipboard
open override val sourceLocation: SourceLocation?