Sha256: 2c97ffb88e32193efc7a368aaa4704b9accd1be22c2073e5e707ac9cfb254d0b
Contents?: true
Size: 721 Bytes
Versions: 8
Compression:
Stored size: 721 Bytes
Contents
module GraphQL module StaticValidation class ArgumentLiteralsAreCompatible < GraphQL::StaticValidation::ArgumentsValidator def validate_node(parent, node, defn, context) return if node.value.is_a?(GraphQL::Language::Nodes::VariableIdentifier) arg_defn = defn.arguments[node.name] return unless arg_defn if !context.valid_literal?(node.value, arg_defn.type) kind_of_node = node_type(parent) error_arg_name = parent_name(parent, defn) context.errors << message("Argument '#{node.name}' on #{kind_of_node} '#{error_arg_name}' has an invalid value. Expected type '#{arg_defn.type}'.", parent, context: context) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems