Class: GraphQL::StaticValidation::ArgumentsAreDefined
- Inherits:
-
ArgumentsValidator
- Object
- ArgumentsValidator
- GraphQL::StaticValidation::ArgumentsAreDefined
- Defined in:
- lib/graphql/static_validation/rules/arguments_are_defined.rb
Instance Method Summary collapse
Methods inherited from ArgumentsValidator
Methods included from Message::MessageHelper
Instance Method Details
#validate_node(parent, node, defn, context) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/graphql/static_validation/rules/arguments_are_defined.rb', line 2 def validate_node(parent, node, defn, context) argument_defn = defn.arguments[node.name] if argument_defn.nil? context.errors << ("#{parent.class.name.split("::").last} '#{parent.name}' doesn't accept argument #{node.name}", parent) GraphQL::Language::Visitor::SKIP else nil end end |