Method: GraphQL::Schema#initialize

Defined in:
lib/graphql/schema.rb

#initializeSchema

Returns a new instance of Schema.

Parameters:



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/graphql/schema.rb', line 83

def initialize
  @orphan_types = []
  @directives = DIRECTIVES.reduce({}) { |m, d| m[d.name] = d; m }
  @static_validator = GraphQL::StaticValidation::Validator.new(schema: self)
  @middleware = []
  @query_analyzers = []
  @resolve_type_proc = nil
  @object_from_id_proc = nil
  @id_from_object_proc = nil
  @instrumenters = Hash.new { |h, k| h[k] = [] }
  # Default to the built-in execution strategy:
  @query_execution_strategy = GraphQL::Query::SerialExecution
  @mutation_execution_strategy = GraphQL::Query::SerialExecution
  @subscription_execution_strategy = GraphQL::Query::SerialExecution
end