GraphQLJsonType class

A GraphQLJsonType represents a valid json object

Properties

astNode → TypeDefinitionNode?
If this was parsed from an ast, the node in that ast
no setterinherited
attachments → GraphQLAttachments
Other custom values that may modify the execution, validation or introspection for this element
no setterinherited
description String
A description of this type, which, while optional, can be very useful in tools like GraphiQL.
no setter
extra → GraphQLTypeDefinitionExtra<ScalarTypeDefinitionNode, ScalarTypeExtensionNode>
no setterinherited
generic → GenericHelp<Json>
Utility for working with the Value Generic type
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isNonNullable bool
true when the type can not be null
no setterinherited
isNullable bool
true when the type can be null
no setterinherited
name String
The name of this type.
no setter
printableName String
The name of this type with defaults for GraphQLWrapperType. Can be used as a name of another GraphQL type, useful for composing names for generic types, for example.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
specifiedByURL String?
An url with the specification of this scalar type
no setterinherited

Methods

coerceToInputObject() → GraphQLType<Json, Object?>
Turns this type into one suitable for being provided as an input to a GraphQLObjectField.
deserialize(SerdeCtx serdeCtx, Object? serialized) Json
Deserializes a serialized value.
list() → GraphQLListType<Json?, Object?>
Returns a GraphQLListType with the inner type set to this
inherited
nonNull() → GraphQLNonNullType<Json, Object?>
Creates a non-nullable type that represents this type, and enforces that a field of this type is present in input data.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nullable() → GraphQLType<Json, Object?>
Returns a nullable type that represents this type. If the type is isNullable returns itself without changes.
inherited
serialize(Json value) Object?
Serializes a value.
serializeSafe(Object? value, {bool nested = true}) Object?
inherited
toString() String
A string representation of this object.
inherited
validate(String key, Object? input) → ValidationResult<Object?>
Performs type coercion against an input value, and returns a list of errors if the validation was unsuccessful.
when<O>({required O enum_(GraphQLEnumType<Json>), required O scalar(GraphQLScalarType<Json, Object?>), required O object(GraphQLObjectType<Json>), required O input(GraphQLInputObjectType<Json>), required O union(GraphQLUnionType<Json>), required O list(GraphQLListType), required O nonNullable(GraphQLNonNullType<Json, Object?>)}) → O
Executes any of the provided function with this as argument. The function executed depends on the type of this
inherited
whenMaybe<O>({O enum_(GraphQLEnumType<Json>)?, O scalar(GraphQLScalarType<Json, Object?>)?, O object(GraphQLObjectType<Json>)?, O input(GraphQLInputObjectType<Json>)?, O union(GraphQLUnionType<Json>)?, O list(GraphQLListType)?, O nonNullable(GraphQLNonNullType<Json, Object?>)?, required O orElse(GraphQLType)}) → O
Similar to when, but with optional arguments and a required default case orElse, which is executed when none of the provided functions match this
inherited
whenOrNull<O>({O? enum_(GraphQLEnumType<Json>)?, O? scalar(GraphQLScalarType<Json, Object?>)?, O? object(GraphQLObjectType<Json>)?, O? input(GraphQLInputObjectType<Json>)?, O? union(GraphQLUnionType<Json>)?, O? list(GraphQLListType)?, O? nonNullable(GraphQLNonNullType<Json, Object?>)?}) → O?
Similar to when, but with optional arguments. Returns null when none of the provided functions match this
inherited

Operators

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