GraphQLExtension class abstract

Extensions implement additional functionalities to the server's parsing, validation and execution.

For example, extensions for tracing GraphQLTracingExtension, logging, error handling or caching GraphQLPersistedQueries, CacheExtension.

If an extension is for logging or tracing (do not affect the execution behavior), it should be the first in the GraphQL.extensions list.

Implementers

Constructors

GraphQLExtension()

Properties

hashCode int
The hash code for this object.
no setterinherited
mapKey String
The key identifying this extension, used as the key for the extensions map in GraphQLError or GraphQLResult. Should be unique.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

completeValue(FutureOr<Object?> next(), ObjectExecutionCtx ctx, String fieldName, GraphQLType fieldType, Object? result) FutureOr<Object?>
Maps a resolved value into a serialized value
executeField(FutureOr<Object?> next(), ObjectExecutionCtx ctx, GraphQLObjectField field, String fieldAlias) FutureOr<Object?>
Parses argument values and a executes a field in ctx
executeRequest(FutureOr<GraphQLResult> next(), RequestCtx ctx) FutureOr<GraphQLResult>
The entry point for each request, this is the first method executed in a GraphQLExtension for each request
executeSubscriptionEvent(FutureOr<GraphQLResult> next(), ExecutionCtx ctx, ScopedMap parentGlobals) FutureOr<GraphQLResult>
Called for every GraphQLResult.subscriptionStream event
getDocumentNode(DocumentNode next(), RequestCtx ctx) DocumentNode
Parser or retrieves the GraphQL DocumentNode from query or extensions
mapException(GraphQLException next(), ThrownError error) GraphQLException
Executes a callback for a ThrownError during execution
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveField<T>(FutureOr<T> next(), Ctx ctx) FutureOr<T>
Resolves a field with ctx
toString() String
A string representation of this object.
inherited
validate(GraphQLException? next(), RequestCtx ctx, DocumentNode document) GraphQLException?
Executes validations given a schema, and the operation to perform

Operators

operator ==(Object other) bool
The equality operator.
inherited