class GraphQL::StaticValidation::FieldsAreDefinedOnTypeError
Attributes
Public Class Methods
(String message, type: String, field: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode]) → void
Source
# File lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb, line 13 def initialize(message, type:, field:, path: nil, nodes: []) super(message, path: path, nodes: nodes) @type_name = type #: String @field_name = field #: String end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb, line 34 def code "undefinedField" end
# File lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb, line 21 def to_h extensions = { "code" => code, "typeName" => type_name, "fieldName" => field_name } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h