ast library
Basic tools to work with a GraphQL AST.
Includes
- definitions of all GraphQL AST Node types,
- implementation of Visitor Pattern via Node.accept, Node.visitChildren and Visitor,
- ability to transform ASTs using transform and TransformingVisitor.
Classes
-
AccumulatingVisitor<
A> -
A Visitor to accumulate values of type
A
. - ArgumentNode
- BooleanValueNode
- DefaultValueNode
- DefinitionNode
- DirectiveDefinitionNode
- DirectiveNode
- DocumentNode
- EnumTypeDefinitionNode
- EnumTypeExtensionNode
- EnumValueDefinitionNode
- EnumValueNode
- ExecutableDefinitionNode
- FieldDefinitionNode
- FieldNode
- FloatValueNode
- FragmentDefinitionNode
- FragmentSpreadNode
- InlineFragmentNode
- InputObjectTypeDefinitionNode
- InputObjectTypeExtensionNode
- InputValueDefinitionNode
- InterfaceTypeDefinitionNode
- InterfaceTypeExtensionNode
- IntValueNode
- ListTypeNode
- ListValueNode
- NamedTypeNode
- NameNode
- Node
- The base class for any GraphQL AST Node.
- NullValueNode
- ObjectFieldNode
- ObjectTypeDefinitionNode
- ObjectTypeExtensionNode
- ObjectValueNode
- OperationDefinitionNode
- OperationTypeDefinitionNode
- RecursiveVisitor
- A recursive Visitor calling Node.visitChildren to make sure every node is visited.
- ScalarTypeDefinitionNode
- ScalarTypeExtensionNode
- SchemaDefinitionNode
- SchemaExtensionNode
- SelectionNode
- SelectionSetNode
-
SimpleVisitor<
R> -
A simple implementation of Visitor returning
null
from each visit method. - StringValueNode
- TransformingVisitor
- A Visitor returning the node it is visiting.
- TypeConditionNode
- TypeDefinitionNode
- TypeExtensionNode
- TypeNode
- TypeSystemDefinitionNode
- TypeSystemExtensionNode
- UnionTypeDefinitionNode
- UnionTypeExtensionNode
- ValueNode
- VariableDefinitionNode
- VariableNode
-
Visitor<
R> - A class defining visit methods for all concrete subclasses of Node.
Enums
- DirectiveLocation
- Enumeration of all known directive locations.
- OperationType
- Enumeration of all known GraphQL operation types.
Functions
-
transform<
N extends Node> (N node, List< TransformingVisitor> visitors) → N -
Transforms an AST
node
using a list ofvisitors
.