Sha256: 0fffc51596d067cf84e88bb43c3794d82dd02d5853e4747e9d3cfb9501a74975
Contents?: true
Size: 772 Bytes
Versions: 5
Compression:
Stored size: 772 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) validator = GraphQL::StaticValidation::LiteralValidator.new arg_defn = defn.arguments[node.name] return unless arg_defn valid = validator.validate(node.value, arg_defn.type) if !valid 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", parent, context: context) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems