Method: GraphQL::Execution::Lookahead#initialize
- Defined in:
- lib/graphql/execution/lookahead.rb
#initialize(query:, ast_nodes:, field: nil, root_type: nil, owner_type: nil) ⇒ Lookahead
Returns a new instance of Lookahead.
34 35 36 37 38 39 40 41 |
# File 'lib/graphql/execution/lookahead.rb', line 34 def initialize(query:, ast_nodes:, field: nil, root_type: nil, owner_type: nil) @ast_nodes = ast_nodes.freeze @field = field @root_type = root_type @query = query @selected_type = @field ? @field.type.unwrap : root_type @owner_type = owner_type end |