Sha256: 579d679582f1418b7fc43e2217b914905f645181b2f1de55aad61b45da84bd64
Contents?: true
Size: 901 Bytes
Versions: 20
Compression:
Stored size: 901 Bytes
Contents
# frozen_string_literal: true module GraphQL module StaticValidation class ArgumentLiteralsAreCompatibleError < StaticValidation::Error attr_reader :type_name attr_reader :argument_name def initialize(message, path: nil, nodes: [], type:, argument: nil, extensions: nil) super(message, path: path, nodes: nodes) @type_name = type @argument_name = argument @extensions = extensions end # A hash representation of this Message def to_h extensions = { "code" => code, "typeName" => type_name }.tap { |h| h["argumentName"] = argument_name unless argument_name.nil? } extensions.merge!(@extensions) unless @extensions.nil? super.merge({ "extensions" => extensions }) end def code "argumentLiteralsIncompatible" end end end end
Version data entries
20 entries across 20 versions & 1 rubygems