Method: GraphQL::Schema::Validator#validate

Defined in:
lib/graphql/schema/validator.rb

#validate(object, context, value) ⇒ nil, ...

Returns Error message or messages to add.

Parameters:

  • object (Object)

    The application object that this argument's field is being resolved for

  • context (GraphQL::Query::Context)
  • value (Object)

    The client-provided value for this argument (after parsing and coercing by the input type)

Returns:

  • (nil, Array<String>, String)

    Error message or messages to add

Raises:



23
24
25
# File 'lib/graphql/schema/validator.rb', line 23

def validate(object, context, value)
  raise GraphQL::RequiredImplementationMissingError, "Validator classes should implement #validate"
end