Method: GraphQL::StaticValidation::TypeStack#initialize
- Defined in:
- lib/graphql/static_validation/type_stack.rb
#initialize(schema, visitor) ⇒ TypeStack
Returns a new instance of TypeStack.
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/graphql/static_validation/type_stack.rb', line 38 def initialize(schema, visitor) @schema = schema @object_types = [] @field_definitions = [] @directive_definitions = [] @argument_definitions = [] @path = [] PUSH_STRATEGIES.each do |node_class, strategy| visitor[node_class].enter << EnterWithStrategy.new(self, strategy) visitor[node_class].leave << LeaveWithStrategy.new(self, strategy) end end |