class GraphQL::Language::OperationDefinition
Overview
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
Defined in:
graphql/language/nodes.crConstant Summary
-
VALUES =
[{operation_type, String}, {name, ::Union(String, ::Nil)}, {variables, Array(VariableDefinition)}, {directives, Array(Directive)}, {selections, Array(Selection)}] of Tuple(Symbol, Object.class)
-
A query, mutation or subscription. May be anonymous or named. May be explicitly typed (eg
mutation { ... }
) or implicitly a query (eg{ ... }
). -
VISITS =
[{:children, [:variables, :directives, :selections]}] of Tuple(Symbol, Array(Symbol))
-
A query, mutation or subscription. May be anonymous or named. May be explicitly typed (eg
mutation { ... }
) or implicitly a query (eg{ ... }
).
Constructors
-
.new(operation_type, name, variables, directives, selections, **rest)
A query, mutation or subscription.
Class Method Summary
-
.values
A query, mutation or subscription.
Macro Summary
-
accessors(name, type, default)
A query, mutation or subscription.
-
traverse(name, *values)
A query, mutation or subscription.
-
values(args)
A query, mutation or subscription.
Instance Method Summary
-
#==(other : GraphQL::Language::OperationDefinition)
A query, mutation or subscription.
-
#clone
Returns a copy of
self
with all instance variables cloned. - #directives : Array(Directive)
- #directives=(directives : Array(Directive))
-
#map_children(&block : ASTNode -> _)
A query, mutation or subscription.
- #name : Union(String, Nil)
- #name=(name : Union(String, Nil))
- #operation_type : String
- #operation_type=(operation_type : String)
- #selections : Array(Selection)
- #selections=(selections : Array(Selection))
-
#values
A query, mutation or subscription.
- #variables : Array(VariableDefinition)
- #variables=(variables : Array(VariableDefinition))
-
#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
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
Class Method Detail
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
Macro Detail
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
Instance Method Detail
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
A query, mutation or subscription.
May be anonymous or named.
May be explicitly typed (eg mutation { ... }
) or implicitly a query (eg { ... }
).
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.