Module: GraphQL::Query::Runnable
- Included in:
- GraphQL::Query, Partial
- Defined in:
- lib/graphql/query.rb
Overview
Code shared with Partial
Instance Method Summary collapse
-
#after_lazy(value, &block) ⇒ Object
-
#arguments_cache ⇒ Object
-
#arguments_for(ast_node, definition, parent_object: nil) ⇒ Hash{Symbol => Object}
Node-level cache for calculating arguments.
-
#handle_or_reraise(err) ⇒ Object
private
Instance Method Details
#after_lazy(value, &block) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/graphql/query.rb', line 22 def after_lazy(value, &block) if !defined?(@runtime_instance) @runtime_instance = context.namespace(:interpreter_runtime)[:runtime] end if @runtime_instance @runtime_instance.minimal_after_lazy(value, &block) else @schema.after_lazy(value, &block) end end |
#arguments_cache ⇒ Object
43 44 45 |
# File 'lib/graphql/query.rb', line 43 def arguments_cache @arguments_cache ||= Execution::Interpreter::ArgumentsCache.new(self) end |
#arguments_for(ast_node, definition, parent_object: nil) ⇒ Hash{Symbol => Object}
Node-level cache for calculating arguments. Used during execution and query analysis.
39 40 41 |
# File 'lib/graphql/query.rb', line 39 def arguments_for(ast_node, definition, parent_object: nil) arguments_cache.fetch(ast_node, definition, parent_object) end |
#handle_or_reraise(err) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 |
# File 'lib/graphql/query.rb', line 48 def handle_or_reraise(err) @schema.handle_or_reraise(context, err) end |