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>
Top-level GraphQL units: operations or fragments.
Attributes inherited from AbstractNode
Instance Method Summary collapse
Methods inherited from AbstractNode
child_attributes, #children, #eql?, inherited, #initialize, #position, scalar_attributes, #scalars, #to_query_string
Constructor Details
This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode
Instance Attribute Details
permalink #definitions ⇒ Array<OperationDefinition, FragmentDefinition>
Returns top-level GraphQL units: operations or fragments.
183 184 185 |
# File 'lib/graphql/language/nodes.rb', line 183 def definitions @definitions end |
Instance Method Details
permalink #initialize_node(definitions: []) ⇒ Object
[View source]
183 184 185 |
# File 'lib/graphql/language/nodes.rb', line 183 def initialize_node(definitions: []) @definitions = definitions end |
permalink #slice_definition(name) ⇒ Object
[View source]
187 188 189 |
# File 'lib/graphql/language/nodes.rb', line 187 def slice_definition(name) GraphQL::Language::DefinitionSlice.slice(self, name) end |