[][src]Module async_graphql_parser::types

GraphQL types.

The two root types are ExecutableDocument and ServiceDocument, representing an executable GraphQL query and a GraphQL service respectively.

This follows the June 2018 edition of the GraphQL spec.

Structs

ConstDirective

A const GraphQL directive, such as @deprecated(reason: "Use the other field). This differs from Directive in that it uses ConstValue instead of Value.

Directive

A GraphQL directive, such as @deprecated(reason: "Use the other field").

DirectiveDefinition

The definition of a directive in a service.

EnumType

The definition of an enum.

EnumValueDefinition

The definition of a value inside an enum.

ExecutableDocument

An executable GraphQL file or request string.

ExecutableDocumentData

The data of an executable document. This is a ExecutableDocument with at least one operation, and any number of fragments.

Field

A field being selected on an object, such as name or weightKilos: weight(unit: KILOGRAMS).

FieldDefinition

The definition of a field inside an object or interface.

FragmentDefinition

The definition of a fragment, such as fragment userFields on User { name age }.

FragmentSpread

A fragment selector, such as ... userFields.

InlineFragment

An inline fragment selector, such as ... on User { name }.

InputObjectType

The definition of an input object.

InputValueDefinition

The definition of an input value inside the arguments of a field.

InterfaceType

The definition of an interface type.

Name

A GraphQL name. This is a newtype wrapper around a string with the addition guarantee that it is a valid GraphQL name (follows the regex [_A-Za-z][_0-9A-Za-z]*).

Number

Represents a JSON number, whether integer or floating point.

ObjectType

The definition of an object type.

OperationDefinition

A GraphQL operation, such as mutation($content:String!) { makePost(content: $content) { id } }.

SchemaDefinition

The definition of the schema in a GraphQL service.

SelectionSet

A set of fields to be selected, for example { name age }.

ServiceDocument

An GraphQL file or request string defining a GraphQL service.

Type

A GraphQL type, for example String or [String!]!.

TypeCondition

A type a fragment can apply to (on followed by the type).

TypeDefinition

The definition of a type in a GraphQL service.

UnionType

The definition of a union type.

UploadValue

A file upload value.

VariableDefinition

A variable definition inside a list of variable definitions, for example $name:String!.

Enums

BaseType

A GraphQL base type, for example String or [String!]. This does not include whether the type is nullable; for that see Type.

ConstValue

A resolved GraphQL value, for example 1 or "Hello World!".

DirectiveLocation

Where a directive can apply to.

ExecutableDefinition

An executable definition in a query; a query, mutation, subscription or fragment definition.

OperationType

The type of an operation; query, mutation or subscription.

Selection

A part of an object to be selected; a single field, a fragment spread or an inline fragment.

TypeKind

A kind of type; scalar, object, enum, etc.

TypeSystemDefinition

A definition concerning the type system of a GraphQL service.

Value

A GraphQL value, for example 1, $name or "Hello World!". This is ConstValue with variables.