Expand description
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§
- Const
Directive - A const GraphQL directive, such as
@deprecated(reason: "Use the other field)
. This differs fromDirective
in that it usesConstValue
instead ofValue
. - Directive
- A GraphQL directive, such as
@deprecated(reason: "Use the other field")
. - Directive
Definition - The definition of a directive in a service.
- Enum
Type - The definition of an enum.
- Enum
Value Definition - The definition of a value inside an enum.
- Executable
Document - An executable GraphQL file or request string.
- Field
- A field being selected on an object, such as
name
orweightKilos: weight(unit: KILOGRAMS)
. - Field
Definition - The definition of a field inside an object or interface.
- Fragment
Definition - The definition of a fragment, such as
fragment userFields on User { name age }
. - Fragment
Spread - A fragment selector, such as
... userFields
. - Inline
Fragment - An inline fragment selector, such as
... on User { name }
. - Input
Object Type - The definition of an input object.
- Input
Value Definition - The definition of an input value inside the arguments of a field.
- Interface
Type - The definition of an interface type.
- Object
Type - The definition of an object type.
- Operation
Definition - A GraphQL operation, such as
mutation($content:String!) { makePost(content: $content) { id } }
. - Operations
Iter - An iterator over the operations of a document.
- Schema
Definition - The definition of the schema in a GraphQL service.
- Selection
Set - A set of fields to be selected, for example
{ name age }
. - Service
Document - A GraphQL file or request string defining a GraphQL service.
- Type
- A GraphQL type, for example
String
or[String!]!
. - Type
Condition - A type a fragment can apply to (
on
followed by the type). - Type
Definition - The definition of a type in a GraphQL service.
- Union
Type - The definition of a union type.
- Variable
Definition - A variable definition inside a list of variable definitions, for example
$name:String!
.
Enums§
- Base
Type - A GraphQL base type, for example
String
or[String!]
. This does not include whether the type is nullable; for that see Type. - Directive
Location - Where a directive can apply to.
- Document
Operations - The operations of a GraphQL document.
- Operation
Type - The type of an operation;
query
,mutation
orsubscription
. - Selection
- A part of an object to be selected; a single field, a fragment spread or an inline fragment.
- Type
Kind - A kind of type; scalar, object, enum, etc.
- Type
System Definition - A definition concerning the type system of a GraphQL service.