Class: GraphQL::StaticValidation::RequiredInputObjectAttributesArePresent

Inherits:
Object
  • Object
show all
Includes:
ArgumentsValidator::ArgumentsValidatorHelpers, Message::MessageHelper
Defined in:
lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb

Instance Method Summary collapse

Methods included from Message::MessageHelper

#message

Instance Method Details

#validate(context) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb', line 8

def validate(context)
  visitor = context.visitor
  visitor[GraphQL::Language::Nodes::InputObject] << ->(node, parent) {
    next unless parent.is_a? GraphQL::Language::Nodes::Argument
    validate_input_object(node, context, parent)
  }
end