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