Class: GraphQL::StaticValidation::FragmentSpreadsArePossible::FragmentSpread

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node:, parent_type:, path:) ⇒ FragmentSpread

: (node: GraphQL::Language::Nodes::FragmentSpread, parent_type: GraphQL::Schema::Member::type_definition?, path: Array[String | Integer]) -> void



84
85
86
87
88
# File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb', line 84

def initialize(node:, parent_type:, path:)
  @node = node #: GraphQL::Language::Nodes::FragmentSpread
  @parent_type = parent_type #: GraphQL::Schema::Member::type_definition?
  @path = path #: Array[String | Integer]
end

Instance Attribute Details

#node ⇒ Object (readonly)

: GraphQL::Language::Nodes::FragmentSpread



77
78
79
# File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb', line 77

def node
  @node
end

#parent_type ⇒ Object (readonly)

: GraphQL::Schema::Member::type_definition?



79
80
81
# File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb', line 79

def parent_type
  @parent_type
end

#path ⇒ Object (readonly)

: Array[String | Integer]



81
82
83
# File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb', line 81

def path
  @path
end