Module: GraphQL::StaticValidation::Error::ErrorHelper
- Defined in:
- lib/graphql/static_validation/error.rb
Overview
Convenience for validators
Instance Method Summary collapse
-
#error(error_message, nodes, context: nil, path: nil, extensions: {}) ⇒ Object
Error
error_message
is located atnode
.
Instance Method Details
#error(error_message, nodes, context: nil, path: nil, extensions: {}) ⇒ Object
Error error_message
is located at node
9 10 11 12 13 |
# File 'lib/graphql/static_validation/error.rb', line 9 def error(, nodes, context: nil, path: nil, extensions: {}) path ||= context.path nodes = Array(nodes) GraphQL::StaticValidation::Error.new(, nodes: nodes, path: path) end |