Class: GraphQL::StaticValidation::FragmentsAreOnCompositeTypesError
- Defined in:
- lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb
Instance Attribute Summary collapse
- 
  
    
      #argument_name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute argument_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:)  ⇒ FragmentsAreOnCompositeTypesError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of FragmentsAreOnCompositeTypesError. 
- 
  
    
      #to_h  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    A hash representation of this Message. 
Constructor Details
#initialize(message, path: nil, nodes: [], type:) ⇒ FragmentsAreOnCompositeTypesError
Returns a new instance of FragmentsAreOnCompositeTypesError.
| 8 9 10 11 | # File 'lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb', line 8 def initialize(, path: nil, nodes: [], type:) super(, path: path, nodes: nodes) @type_name = type end | 
Instance Attribute Details
#argument_name ⇒ Object (readonly)
Returns the value of attribute argument_name.
| 6 7 8 | # File 'lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb', line 6 def argument_name @argument_name end | 
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
| 5 6 7 | # File 'lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb', line 5 def type_name @type_name end | 
Instance Method Details
#code ⇒ Object
| 25 26 27 | # File 'lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb', line 25 def code "fragmentOnNonCompositeType" end | 
#to_h ⇒ Object
A hash representation of this Message
| 14 15 16 17 18 19 20 21 22 23 | # File 'lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb', line 14 def to_h extensions = { "code" => code, "typeName" => type_name } super.merge({ "extensions" => extensions }) end |