class GraphQL::StaticValidation::FieldsHaveAppropriateSelectionsError
Attributes
Public Class Methods
# File lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb, line 9 def initialize(message, path: nil, nodes: [], node_name:, type: nil) super(message, path: path, nodes: nodes) @node_name = node_name @type_name = type end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
Source
# File lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb, line 27 def code "selectionMismatch" end
Source
# File lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb, line 16 def to_h extensions = { "code" => code, "nodeName" => node_name }.tap { |h| h["typeName"] = type_name unless type_name.nil? } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h