Class: GraphQL::Language::Nodes::FragmentDefinition
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::FragmentDefinition
- Defined in:
- lib/graphql/language/nodes.rb
Overview
A reusable fragment, defined at document-level.
Instance Attribute Summary collapse
-
#directives ⇒ Object
Returns the value of attribute directives.
-
#name ⇒ String
The identifier for this fragment, which may be applied with ‘…##name`.
-
#selections ⇒ Object
Returns the value of attribute selections.
-
#type ⇒ String
The type condition for this fragment (name of type which it may apply to).
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
#directives ⇒ Object
Returns the value of attribute directives.
193 194 195 |
# File 'lib/graphql/language/nodes.rb', line 193 def directives @directives end |
#name ⇒ String
Returns the identifier for this fragment, which may be applied with ‘…##name`.
197 198 199 |
# File 'lib/graphql/language/nodes.rb', line 197 def name @name end |
#selections ⇒ Object
Returns the value of attribute selections.
193 194 195 |
# File 'lib/graphql/language/nodes.rb', line 193 def selections @selections end |
#type ⇒ String
Returns the type condition for this fragment (name of type which it may apply to).
202 203 204 |
# File 'lib/graphql/language/nodes.rb', line 202 def type @type end |
Instance Method Details
#initialize_node(name: nil, type: nil, directives: [], selections: []) ⇒ Object
202 203 204 205 206 207 |
# File 'lib/graphql/language/nodes.rb', line 202 def initialize_node(name: nil, type: nil, directives: [], selections: []) @name = name @type = type @directives = directives @selections = selections end |