Skip to content

Commit 6928f7d

Browse files
authored
Merge pull request rmosolgo#4984 from rmosolgo/fix-result-docs
Update docs for result return type
2 parents b55f2a8 + ed60c6c commit 6928f7d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: ruby/setup-ruby@v1
2020
with:
21-
ruby-version: 2.7
21+
ruby-version: 3.3
2222
bundler-cache: true
2323
- run: bundle exec rake compile
2424
- uses: ruby/setup-ruby@v1
2525
with:
26-
ruby-version: 2.7
26+
ruby-version: 3.3
2727
bundler-cache: true
2828
env:
2929
BUNDLE_GEMFILE: ./spec/dummy/Gemfile

lib/graphql/execution/interpreter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class << self
2020
# @param queries [Array<GraphQL::Query, Hash>]
2121
# @param context [Hash]
2222
# @param max_complexity [Integer, nil]
23-
# @return [Array<Hash>] One result per query
23+
# @return [Array<GraphQL::Query::Result>] One result per query
2424
def run_all(schema, query_options, context: {}, max_complexity: schema.max_complexity)
2525
queries = query_options.map do |opts|
2626
case opts

lib/graphql/query.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def operations
222222
end
223223

224224
# Get the result for this query, executing it once
225-
# @return [Hash] A GraphQL response, with `"data"` and/or `"errors"` keys
225+
# @return [GraphQL::Query::Result] A Hash-like GraphQL response, with `"data"` and/or `"errors"` keys
226226
def result
227227
if !@executed
228228
Execution::Interpreter.run_all(@schema, [self], context: @context)

lib/graphql/schema.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ def sanitized_printer(new_sanitized_printer = nil)
12831283

12841284
# Execute a query on itself.
12851285
# @see {Query#initialize} for arguments.
1286-
# @return [Hash] query result, ready to be serialized as JSON
1286+
# @return [GraphQL::Query::Result] query result, ready to be serialized as JSON
12871287
def execute(query_str = nil, **kwargs)
12881288
if query_str
12891289
kwargs[:query] = query_str
@@ -1323,7 +1323,7 @@ def execute(query_str = nil, **kwargs)
13231323
# @see {Execution::Multiplex#run_all} for multiplex keyword arguments
13241324
# @param queries [Array<Hash>] Keyword arguments for each query
13251325
# @param context [Hash] Multiplex-level context
1326-
# @return [Array<Hash>] One result for each query in the input
1326+
# @return [Array<GraphQL::Query::Result>] One result for each query in the input
13271327
def multiplex(queries, **kwargs)
13281328
GraphQL::Execution::Interpreter.run_all(self, queries, **kwargs)
13291329
end

0 commit comments

Comments
 (0)