Class: GraphQL::Language::Nodes::InlineFragment
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::InlineFragment
- Defined in:
- lib/graphql/language/nodes.rb
Overview
An unnamed fragment, defined directly in the query with ... { }
Instance Attribute Summary collapse
-
#directives ⇒ Object
Returns the value of attribute directives.
-
#selections ⇒ Object
Returns the value of attribute selections.
-
#type ⇒ String?
Name of the type this fragment applies to, or
nil
if this fragment applies to any type.
Attributes inherited from AbstractNode
Instance Method Summary collapse
-
#children ⇒ Object
-
#initialize_node(type: nil, directives: [], selections: []) ⇒ Object
-
#scalars ⇒ Object
Methods inherited from AbstractNode
#eql?, #initialize, #position, #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
254 255 256 |
# File 'lib/graphql/language/nodes.rb', line 254 def directives @directives end |
#selections ⇒ Object
Returns the value of attribute selections
254 255 256 |
# File 'lib/graphql/language/nodes.rb', line 254 def selections @selections end |
#type ⇒ String?
Returns Name of the type this fragment applies to, or nil
if this fragment applies to any type
259 260 261 |
# File 'lib/graphql/language/nodes.rb', line 259 def type @type end |
Instance Method Details
#children ⇒ Object
265 266 267 |
# File 'lib/graphql/language/nodes.rb', line 265 def children directives + selections end |
#initialize_node(type: nil, directives: [], selections: []) ⇒ Object
259 260 261 262 263 |
# File 'lib/graphql/language/nodes.rb', line 259 def initialize_node(type: nil, directives: [], selections: []) @type = type @directives = directives @selections = selections end |
#scalars ⇒ Object
269 270 271 |
# File 'lib/graphql/language/nodes.rb', line 269 def scalars [type] end |