Class: GraphQL::StaticValidation::TypeStack::FragmentWithTypeStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/static_validation/type_stack.rb

Instance Method Summary collapse

Instance Method Details

#pop(stack, node) ⇒ Object



58
59
60
# File 'lib/graphql/static_validation/type_stack.rb', line 58

def pop(stack, node)
  stack.object_types.pop
end

#push(stack, node) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/graphql/static_validation/type_stack.rb', line 50

def push(stack, node)
  object_type = stack.schema.types.fetch(node.type, nil)
  if !object_type.nil?
    object_type = object_type.unwrap
  end
  stack.object_types.push(object_type)
end