class GraphQL::StaticValidation::FragmentsAreOnCompositeTypesError
Attributes
Public Class Methods
(String message, type: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode]) → void
Source
# File lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb, line 11 def initialize(message, type:, path: nil, nodes: []) super(message, path: path, nodes: nodes) @type_name = type #: String end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb, line 30 def code "fragmentOnNonCompositeType" end
# File lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb, line 18 def to_h extensions = { "code" => code, "typeName" => type_name } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h