Class: GraphQL::StaticValidation::FragmentSpreadsArePossibleError
- Defined in:
 - lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb
 
Instance Attribute Summary collapse
- 
  
    
      #fragment_name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute fragment_name.
 - 
  
    
      #parent_name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute parent_name.
 - 
  
    
      #type_name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute type_name.
 
Attributes inherited from Error
Instance Method Summary collapse
- 
  
    
      #code  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
 - 
  
    
      #initialize(message, path: nil, nodes: [], type:, fragment_name:, parent:)  ⇒ FragmentSpreadsArePossibleError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of FragmentSpreadsArePossibleError.
 - 
  
    
      #to_h  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
A hash representation of this Message.
 
Constructor Details
#initialize(message, path: nil, nodes: [], type:, fragment_name:, parent:) ⇒ FragmentSpreadsArePossibleError
Returns a new instance of FragmentSpreadsArePossibleError.
      9 10 11 12 13 14  | 
    
      # File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb', line 9 def initialize(, path: nil, nodes: [], type:, fragment_name:, parent:) super(, path: path, nodes: nodes) @type_name = type @fragment_name = fragment_name @parent_name = parent end  | 
  
Instance Attribute Details
#fragment_name ⇒ Object (readonly)
Returns the value of attribute fragment_name.
      6 7 8  | 
    
      # File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb', line 6 def fragment_name @fragment_name end  | 
  
#parent_name ⇒ Object (readonly)
Returns the value of attribute parent_name.
      7 8 9  | 
    
      # File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb', line 7 def parent_name @parent_name end  | 
  
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
      5 6 7  | 
    
      # File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb', line 5 def type_name @type_name end  | 
  
Instance Method Details
#code ⇒ Object
      30 31 32  | 
    
      # File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb', line 30 def code "cannotSpreadFragment" end  | 
  
#to_h ⇒ Object
A hash representation of this Message
      17 18 19 20 21 22 23 24 25 26 27 28  | 
    
      # File 'lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb', line 17 def to_h extensions = { "code" => code, "typeName" => type_name, "fragmentName" => fragment_name, "parentName" => parent_name } super.merge({ "extensions" => extensions }) end  |