GraphQLObjectField<Value, Serialized, P> class

A field on a GraphQLObjectType.

It can have input values and additional documentation, and explicitly declares it shape within the schema.

Implemented types
Annotations
  • @immutable

Constructors

GraphQLObjectField(String name, GraphQLType<Value, Serialized> type, {Iterable<GraphQLFieldInput> inputs = const <GraphQLFieldInput>[], FieldResolver<Value, P>? resolve, FieldSubscriptionResolver<Value>? subscribe, String? deprecationReason, String? description, GraphQLAttachments attachments = const [], FieldDefinitionNode? astNode})
Default GraphQL field constructor

Properties

astNode → FieldDefinitionNode?
If this was parsed from an ast, the node in that ast
final
attachments GraphQLAttachments
Other custom values that may modify the execution, validation or introspection for this element
final
deprecationReason String?
The reason that this field, if it is deprecated, was deprecated.
final
description String?
An optional description of this field; useful for tools like GraphiQL.
final
hashCode int
The hash code for this object.
no setterinherited
inputs List<GraphQLFieldInput>
The list of input values this field accepts, if any.
final
isDeprecated bool
Returns true if this field has a deprecationReason.
no setter
name String
The name of this field in serialized input.
final
resolve FieldResolver<Value, P>?
A function used to evaluate the Value of this field, with respect to the parent (root) value P and context Ctx.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subscribe FieldSubscriptionResolver<Value>?
A function used to evaluate the Stream of Values of this field, with respect to the parent (root) value P and context Ctx.
final
type GraphQLType<Value, Serialized>
The GraphQLType associated with values that this field's resolve callback returns.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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