Sha256: abbeadf69ffe18201c7559193b6b60986df3d026ad378d56d42812b3a8ec55b7
Contents?: true
Size: 743 Bytes
Versions: 213
Compression:
Stored size: 743 Bytes
Contents
# frozen_string_literal: true module GraphQL module Execution class Interpreter class ExecutionErrors def initialize(ctx, ast_node, path) @context = ctx @ast_node = ast_node @path = path end def add(err_or_msg) err = case err_or_msg when String GraphQL::ExecutionError.new(err_or_msg) when GraphQL::ExecutionError err_or_msg else raise ArgumentError, "expected String or GraphQL::ExecutionError, not #{err_or_msg.class} (#{err_or_msg.inspect})" end err.ast_node ||= @ast_node err.path ||= @path @context.add_error(err) end end end end end
Version data entries
213 entries across 213 versions & 2 rubygems