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
68
69
70
|
# File 'lib/graphql/static_validation/type_stack.rb', line 68
def pop(stack, node)
stack.object_types.pop
end
|
#push(stack, node) ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/graphql/static_validation/type_stack.rb', line 56
def push(stack, node)
object_type = if node.type
stack.schema.types.fetch(node.type, nil)
else
stack.object_types.last
end
if !object_type.nil?
object_type = object_type.unwrap
end
stack.object_types.push(object_type)
end
|