Method: GraphQL::Query::Executor#result
- Defined in:
- lib/graphql/query/executor.rb
#result ⇒ Hash
Evalute GraphQL::Query#operation_name on #query. Handle ExecutionErrors by putting them in the "errors" key.
18 19 20 21 22 23 |
# File 'lib/graphql/query/executor.rb', line 18 def result execute rescue GraphQL::ExecutionError => err query.context.errors << err {"errors" => [err.to_h]} end |