module GraphQL::StaticValidation::Error::ErrorHelper
Convenience for validators
Public Instance Methods
(String error_message, GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode] nodes, ?context: GraphQL::StaticValidation::ValidationContext?, ?path: Array[String | Integer]?, ?extensions: Hash[String, untyped]) → GraphQL::StaticValidation::Error
Source
# File lib/graphql/static_validation/error.rb, line 14 def error(error_message, nodes, context: nil, path: nil, extensions: {}) path ||= (context #: as !nil ).path nodes = Array(nodes) GraphQL::StaticValidation::Error.new(error_message, nodes: nodes, path: path) end
Error error_message is located at node