operation library

AST-based GraphQL Executable Definitions (operations).

Adds type resolution and useful helper methods for working with executable graphql documents, such as is useful for code generation.

The primary entrypoint is usually ExecutableDocument which accepts an gql.ast.DocumentNode, a tearoff of gql.schema.GraphQLSchema.getType(), and an optional list of imported ASTs.

NOTE: This library is currently only for working with executable definitions.

Classes

ExecutableDefinition
ExecutableDocument
An executable document containing only ExecutableDefinitions.
ExecutableGraphQLEntity
ExecutableTypeResolver
Enables "type resolution" for implementing classes, allowing for type-dereferencing, such as is done by ExecutableDocument.
ExecutableWithResolver
Field
A SelectionSet is primarily composed of fields.
FragmentDefinition
Fragments are the primary unit of composition in GraphQL.
FragmentSpread
FragmentDefinitions are consumed by using the spread operator (...).
GetExecutableType
Container for the fromSchema and fromFragments dereferencing callbacks necessary for full type information while working with an ExecutableDocument.
InlineFragment
Inline Fragments are FragmentDefinitions defined inline within a SelectionSet.
OperationDefinition
An Operation consists of an optional operation name and a SelectionSet into one of the root OperationTypeDefinitions.
Selection
SelectionSets consist of selections (Fields, FragmentSpreads, or InlineFragments)s
SelectionSet
Selection Sets specify the Fields to select from their cooresponding schema type, either directly, or indirectly through FragmentSpreads and InlineFragments.
TypeCondition
FragmentDefinitions must specify the type they apply to through type conditions
VariableDefinition
Variables can be used to parameterize OperationDefinitions, maximizing query reuse, and avoiding costly string building in clients at runtime.

Typedefs

ResolveFragment = FragmentDefinition? Function(String name)
Callback to dereference a full fragment definition by name