class GraphQL::Execution::Execute

A valid execution strategy @api private

Constants

PROPAGATE_NULL

@api private

SKIP

Just a singleton for implementing {Query::Context#skip} @api private

Public Class Methods

begin_multiplex(_multiplex) click to toggle source
# File lib/graphql/execution/execute.rb, line 34
def self.begin_multiplex(_multiplex)
end
begin_query(query, _multiplex) click to toggle source
# File lib/graphql/execution/execute.rb, line 37
def self.begin_query(query, _multiplex)
  ExecutionFunctions.resolve_root_selection(query)
end
finish_multiplex(results, multiplex) click to toggle source
# File lib/graphql/execution/execute.rb, line 41
def self.finish_multiplex(results, multiplex)
  ExecutionFunctions.lazy_resolve_root_selection(results, multiplex: multiplex)
end
finish_query(query, _multiplex) click to toggle source
# File lib/graphql/execution/execute.rb, line 45
def self.finish_query(query, _multiplex)
  {
    "data" => Execution::Flatten.call(query.context)
  }
end
use(schema_class) click to toggle source
# File lib/graphql/execution/execute.rb, line 21
def self.use(schema_class)
  schema_class.query_execution_strategy(self)
  schema_class.mutation_execution_strategy(self)
  schema_class.subscription_execution_strategy(self)
end

Public Instance Methods

execute(ast_operation, root_type, query) click to toggle source
# File lib/graphql/execution/execute.rb, line 27
def execute(ast_operation, root_type, query)
  GraphQL::Deprecation.warn "#{self.class} will be removed in GraphQL-Ruby 2.0, please upgrade to the Interpreter: https://graphql-ruby.org/queries/interpreter.html"
  result = resolve_root_selection(query)
  lazy_resolve_root_selection(result, **{query: query})
  GraphQL::Execution::Flatten.call(query.context)
end