Exception: GraphQL::Client::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/graphql/client/response.rb

Overview

Public: An error received from the server on execution.

Extends StandardError hierarchy so you may raise this instance.

Examples

raise response.errors.first

Instance Method Summary collapse

Constructor Details

#initialize(definition, error) ⇒ ResponseError

Internal: Initialize ResponseError.



109
110
111
112
113
# File 'lib/graphql/client/response.rb', line 109

def initialize(definition, error)
  @request_definition = definition
  @locations = error["locations"]
  super error["message"]
end