class GraphQL::StaticValidation::ArgumentLiteralsAreCompatibleError
Attributes
Public Class Methods
# File lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb, line 11 def initialize(message, path: nil, nodes: [], type:, argument_name: nil, extensions: nil, coerce_extensions: nil, argument: nil, value: nil) super(message, path: path, nodes: nodes) @type_name = type @argument_name = argument_name @extensions = extensions @coerce_extensions = coerce_extensions @argument = argument @value = value end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
Source
# File lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb, line 44 def code "argumentLiteralsIncompatible" end
Source
# File lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb, line 22 def to_h if @coerce_extensions extensions = @coerce_extensions # This is for legacy compat -- but this key is supposed to be a GraphQL type name :confounded: extensions["typeName"] = "CoercionError" else extensions = { "code" => code, "typeName" => type_name } if argument_name extensions["argumentName"] = argument_name end end extensions.merge!(@extensions) unless @extensions.nil? super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h