class GraphQL::StaticValidation::FragmentSpreadsArePossibleError
Attributes
Public Class Methods
(String message, type: String, fragment_name: String, parent: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode]) → void
Source
# File lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb, line 15 def initialize(message, type:, fragment_name:, parent:, path: nil, nodes: []) super(message, path: path, nodes: nodes) @type_name = type #: String @fragment_name = fragment_name #: String @parent_name = parent #: String end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb, line 38 def code "cannotSpreadFragment" end
# File lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb, line 24 def to_h extensions = { "code" => code, "typeName" => type_name, "fragmentName" => fragment_name, "parentName" => parent_name } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h