class GraphQL::Language::Nodes::FragmentDefinition

A reusable fragment, defined at document-level.

Attributes

directives[RW]
name[RW]
selections[RW]
type[RW]

Public Instance Methods

children() click to toggle source
# File lib/graphql/language/nodes.rb, line 228
def children
  directives + selections
end
initialize_node(name: nil, type: nil, directives: [], selections: []) click to toggle source

@!attribute type

@return [String] the type condition for this fragment (name of type which it may apply to)
# File lib/graphql/language/nodes.rb, line 221
def initialize_node(name: nil, type: nil, directives: [], selections: [])
  @name = name
  @type = type
  @directives = directives
  @selections = selections
end
scalars() click to toggle source
# File lib/graphql/language/nodes.rb, line 232
def scalars
  [name, type]
end