graphql_schema library

Classes

GraphExceptionErrorLocation
Information about a location in source text that caused an error during the execution of a GraphQL query. [...]
GraphQLClass
Signifies that a class should statically generate a GraphQLSchema.
GraphQLDocumentation
A metadata annotation used to provide documentation to package:graphql_server.
GraphQLEnumType<Value>
A GraphQLType with only a predetermined number of possible values. [...]
GraphQLEnumValue<Value>
A known value of a GraphQLEnumType. [...]
GraphQLExceptionError
One of an arbitrary number of errors that may occur during the execution of a GraphQL query. [...]
GraphQLFieldInput<Value, Serialized>
An input to a GraphQL field. This is analogous to a function parameter in Dart.
GraphQLInputObjectField<Value, Serialized>
A field expected within a GraphQLInputObjectType.
GraphQLInputObjectType
A special GraphQLType that specifies the shape of an object that can only be used as an input to a GraphQLField. [...]
GraphQLListType<Value, Serialized>
A special GraphQLType that indicates that input vales should be a list of another type, ofType.
GraphQLNonNullableType<Value, Serialized>
A special GraphQLType that indicates that input values should both be non-null, and be valid when asserted against another type, named ofType.
GraphQLObjectField<Value, Serialized>
A field on a GraphQLObjectType. [...]
GraphQLObjectType
A GraphQLType that specifies the shape of structured data, with multiple fields that can be resolved independently of one another.
GraphQLScalarType<Value, Serialized>
GraphQLSchema
The schema against which queries, mutations, and subscriptions are executed.
GraphQLType<Value, Serialized>
Strictly dictates the structure of some input data in a GraphQL query. [...]
GraphQLUnionType
A special GraphQLType that indicates that an input value may be valid against one or more possibleTypes. [...]
ValidationResult<Value>
Represents the result of asserting an input value against a GraphQLType.

Constants

graphQLClass → const GraphQLClass
The canonical instance.
const GraphQLClass._()

Properties

graphQLBoolean GraphQLScalarType<bool, bool>
true or false.
final
graphQLDate GraphQLScalarType<DateTime, String>
A DateTime, serialized as an ISO-8601 string..
final
graphQLFloat GraphQLScalarType<double, double>
A signed double-precision floating-point value.
final
graphQLId GraphQLScalarType<String, String>
The ID scalar type represents a unique identifier, often used to re-fetch an object or as the key for a cache. [...]
final
graphQLInt GraphQLScalarType<int, int>
A signed 32‐bit integer.
final
graphQLString GraphQLScalarType<String, String>
A UTF‐8 character sequence.
final

Functions

enumType<Value>(String name, Map<String, Value> values, { String description }) GraphQLEnumType
Shorthand for building a GraphQLEnumType.
enumTypeFromStrings(String name, List<String> values, { String description }) GraphQLEnumType<String>
Shorthand for building a GraphQLEnumType where all the possible values are mapped to Dart strings.
field<T, Serialized>(String name, GraphQLType<T, Serialized> type, { Iterable<GraphQLFieldInput<T, Serialized>> inputs: const [], GraphQLFieldResolver<T, Serialized> resolve, String deprecationReason, String description }) GraphQLObjectField<T, Serialized>
Shorthand for generating a GraphQLObjectField.
graphQLSchema({GraphQLObjectType queryType, GraphQLObjectType mutationType, GraphQLObjectType subscriptionType }) GraphQLSchema
A shorthand for creating a GraphQLSchema.
inputField<T, Serialized>(String name, GraphQLType<T, Serialized> type, { String description, T defaultValue }) GraphQLInputObjectField<T, Serialized>
Shorthand for generating a GraphQLInputObjectField.
inputObjectType(String name, { String description, Iterable<GraphQLInputObjectField> inputFields: const [] }) GraphQLInputObjectType
Shorthand for generating a GraphQLInputObjectType.
listOf<Value, Serialized>(GraphQLType<Value, Serialized> innerType) GraphQLListType<Value, Serialized>
Shorthand to create a GraphQLListType.
objectType(String name, { String description, bool isInterface: false, Iterable<GraphQLObjectField> fields: const [], Iterable<GraphQLObjectType> interfaces: const [] }) GraphQLObjectType
Shorthand for generating a GraphQLObjectType.
resolveToNull(dynamic _, dynamic __) → dynamic
A default resolver that always returns null.

Typedefs

GraphDocumentationTypeProvider() GraphQLType
GraphQLFieldResolver<Value, Serialized>(Serialized serialized, Map<String, dynamic> argumentValues) → FutureOr<Value>
Typedef for a function that resolves the value of a GraphQLObjectField, whether asynchronously or not.

Exceptions / Errors

GraphQLException
An exception that occurs during execution of a GraphQL query.