class GraphQL::StaticValidation::FragmentSpreadsArePossibleError
Attributes
Public Class Methods
# File lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb, line 10 def initialize(message, path: nil, nodes: [], type:, fragment_name:, parent:) super(message, path: path, nodes: nodes) @type_name = type @fragment_name = fragment_name @parent_name = parent end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
Source
# File lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb, line 31 def code "cannotSpreadFragment" end
Source
# File lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb, line 18 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