Method: GraphQL::Query::Executor#result
- Defined in:
- lib/graphql/query/executor.rb
#result ⇒ Hash
Evalute operation_name on #query. Handle errors by putting them in the “errors” key. (Or, if query.debug, by re-raising them.)
14 15 16 17 18 19 20 21 22 |
# File 'lib/graphql/query/executor.rb', line 14 def result execute rescue GraphQL::Query::OperationNameMissingError, GraphQL::Query::VariableMissingError => err {"errors" => [{"message" => err.}]} rescue StandardError => err query.debug && raise(err) = "Something went wrong during query execution: #{err}" #\n#{err.backtrace.join("\n ")}" {"errors" => [{"message" => }]} end |