Sha256: 8988b9b490d23d312bd639b1d70c76e2b36e7111eda0493e6c6ca4d32941e488
Contents?: true
Size: 632 Bytes
Versions: 4
Compression:
Stored size: 632 Bytes
Contents
class GraphQL::StaticValidation::ArgumentLiteralsAreCompatible < GraphQL::StaticValidation::ArgumentsValidator def validate_node(node, defn, context) args_with_literals = node.arguments.select {|a| !a.value.is_a?(GraphQL::Nodes::VariableIdentifier)} validator = GraphQL::StaticValidation::LiteralValidator.new args_with_literals.each do |arg| arg_defn = defn.arguments[arg.name] valid = validator.validate(arg.value, arg_defn.type) if !valid context.errors << message("#{arg.name} on #{node.class.name.split("::").last} '#{node.name}' has an invalid value", node) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems