Class: GraphQL::StaticValidation::TypeStack::FragmentWithTypeStrategy
- Inherits:
-
Object
- Object
- GraphQL::StaticValidation::TypeStack::FragmentWithTypeStrategy
show all
- Defined in:
- lib/graphql/static_validation/type_stack.rb
Instance Method Summary
collapse
Instance Method Details
#pop(stack, node) ⇒ Object
62
63
64
|
# File 'lib/graphql/static_validation/type_stack.rb', line 62
def pop(stack, node)
stack.object_types.pop
end
|
#push(stack, node) ⇒ Object
54
55
56
57
58
59
60
|
# File 'lib/graphql/static_validation/type_stack.rb', line 54
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
|