class GraphQL::Language::Document
- GraphQL::Language::Document
- GraphQL::Language::ASTNode
- Reference
- Object
Overview
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Defined in:
graphql/language/nodes.crConstant Summary
-
VALUES =
[{definitions, Array(OperationDefinition | FragmentDefinition | SchemaDefinition | ObjectTypeDefinition | InputObjectTypeDefinition | ScalarTypeDefinition | DirectiveDefinition | EnumTypeDefinition | InterfaceTypeDefinition | UnionTypeDefinition)}] of Tuple(Symbol, Object.class)
-
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
-
VISITS =
[{:children, [:definitions]}] of Tuple(Symbol, Array(Symbol))
-
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Constructors
-
.new(definitions, **rest)
This is the AST root for normal queries
Class Method Summary
-
.values
This is the AST root for normal queries
Macro Summary
-
accessors(name, type, default)
This is the AST root for normal queries
-
traverse(name, *values)
This is the AST root for normal queries
-
values(args)
This is the AST root for normal queries
Instance Method Summary
-
#==(other : GraphQL::Language::Document)
This is the AST root for normal queries
-
#clone
Returns a copy of
self
with all instance variables cloned. - #definitions : Array(OperationDefinition | FragmentDefinition | SchemaDefinition | ObjectTypeDefinition | InputObjectTypeDefinition | ScalarTypeDefinition | DirectiveDefinition | EnumTypeDefinition | InterfaceTypeDefinition | UnionTypeDefinition)
- #definitions=(definitions : Array(OperationDefinition | FragmentDefinition | SchemaDefinition | ObjectTypeDefinition | InputObjectTypeDefinition | ScalarTypeDefinition | DirectiveDefinition | EnumTypeDefinition | InterfaceTypeDefinition | UnionTypeDefinition))
-
#map_children(&block : ASTNode -> _)
This is the AST root for normal queries
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
-
#values
This is the AST root for normal queries
-
#visit(name, visited_ids = [] of UInt64, block = Proc(ASTNode, ASTNode | ::Nil).new do
end)
Recursively apply the given block to each node that gets visited with the given key which nodes get traverses for a given key can be set on a class via the:
traverse :name, :child_1, :child2
macro.
Instance methods inherited from class GraphQL::Language::ASTNode
==(other)
==,
clone
clone,
values
values
Class methods inherited from class GraphQL::Language::ASTNode
values
values
Macros inherited from class GraphQL::Language::ASTNode
accessors(name, type, default)
accessors,
make_value_methods
make_value_methods,
traverse(name, *values)
traverse,
values(args)
values
Constructor Detail
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Class Method Detail
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Macro Detail
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Instance Method Detail
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
This is the AST root for normal queries
@example Deriving a document by parsing a string document = GraphQL.parse(query_string)
Recursively apply the given block to each
node that gets visited with the given key
which nodes get traverses for a given key
can be set on a class via the:
traverse :name, :child_1, :child2
macro. If no children are defined for a
given traversal path name the block is invoked
only with self.ode that gets visited with the given key
which nodes get traverses for a given key
can be set on a class via the:
traverse :name, :child_1, :child2
macro. If no children are defined for a
given traversal path name the block is invoked
only with self.