class GraphQL::Query::SerialExecution

Public Instance Methods

execute(ast_operation, root_type, query_object) click to toggle source

This is the only required method for an Execution strategy. You could create a custom execution strategy and configure your schema to use that custom strategy instead.

@param ast_operation [GraphQL::Language::Nodes::OperationDefinition] The operation definition to run @param root_type [GraphQL::ObjectType] either the query type or the mutation type @param query_object [GraphQL::Query] the query object for this execution @return [Hash] a spec-compliant GraphQL result, as a hash

# File lib/graphql/query/serial_execution.rb, line 18
def execute(ast_operation, root_type, query_object)
  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"
  operation_resolution.resolve(
    query_object.irep_selection,
    root_type,
    query_object
  )
end
field_resolution() click to toggle source
# File lib/graphql/query/serial_execution.rb, line 27
def field_resolution
  self.class::FieldResolution
end
operation_resolution() click to toggle source
# File lib/graphql/query/serial_execution.rb, line 31
def operation_resolution
  self.class::OperationResolution
end
selection_resolution() click to toggle source
# File lib/graphql/query/serial_execution.rb, line 35
def selection_resolution
  self.class::SelectionResolution
end