class GraphQL::StaticValidation::FieldsHaveAppropriateSelectionsError
Attributes
Public Class Methods
(String message, node_name: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode], ?type: String?) → void
Source
# File lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb, line 13 def initialize(message, node_name:, path: nil, nodes: [], type: nil) super(message, path: path, nodes: nodes) @node_name = node_name #: String @type_name = type #: String? end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb, line 33 def code "selectionMismatch" end
# File lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb, line 21 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