Class: GraphQL::Language::Nodes::Document
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::Document
- Defined in:
- lib/graphql/language/nodes.rb
Overview
This is the AST root for normal queries
Instance Attribute Summary collapse
-
#definitions ⇒ Array<OperationDefinition, FragmentDefinition>
(also: #children)
Top-level GraphQL units: operations or fragments.
Attributes inherited from AbstractNode
Instance Method Summary collapse
Methods inherited from AbstractNode
#eql?, #initialize, #position, #scalars, #to_query_string
Constructor Details
This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode
Instance Attribute Details
#definitions ⇒ Array<OperationDefinition, FragmentDefinition> Also known as: children
Returns top-level GraphQL units: operations or fragments
171 172 173 |
# File 'lib/graphql/language/nodes.rb', line 171 def definitions @definitions end |
Instance Method Details
#initialize_node(definitions: []) ⇒ Object
171 172 173 |
# File 'lib/graphql/language/nodes.rb', line 171 def initialize_node(definitions: []) @definitions = definitions end |
#slice_definition(name) ⇒ Object
175 176 177 |
# File 'lib/graphql/language/nodes.rb', line 175 def slice_definition(name) GraphQL::Language::DefinitionSlice.slice(self, name) end |