Skip to content

Commit 3e8c718

Browse files
committed
fix handle_or_reraise
1 parent c93c215 commit 3e8c718

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

lib/graphql/query.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def arguments_cache
4646

4747
# @api private
4848
def handle_or_reraise(err)
49-
@query.schema.handle_or_reraise(context, err)
49+
@schema.handle_or_reraise(context, err)
5050
end
5151
end
5252

lib/graphql/query/partial.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def initialize(path:, object:, query:, context: nil)
1515
@path = path
1616
@object = object
1717
@query = query
18+
@schema = query.schema
1819
context_vals = @query.context.to_h
1920
if context
2021
context_vals = context_vals.merge(context)
@@ -72,7 +73,7 @@ def leaf?
7273
@leaf
7374
end
7475

75-
attr_reader :context, :query, :ast_nodes, :root_type, :object, :field_definition, :path, :parent_type
76+
attr_reader :context, :query, :ast_nodes, :root_type, :object, :field_definition, :path, :parent_type, :schema
7677

7778
attr_accessor :multiplex, :result_values
7879

@@ -95,10 +96,6 @@ def current_trace
9596
@query.current_trace
9697
end
9798

98-
def schema
99-
@query.schema
100-
end
101-
10299
def types
103100
@query.types
104101
end

0 commit comments

Comments
 (0)