Class: GraphQL::StaticValidation::TypeStack::OperationDefinitionStrategy
- Inherits:
-
Object
- Object
- GraphQL::StaticValidation::TypeStack::OperationDefinitionStrategy
- Defined in:
- lib/graphql/static_validation/type_stack.rb
Instance Method Summary collapse
Instance Method Details
#pop(stack, node) ⇒ Object
99 100 101 102 |
# File 'lib/graphql/static_validation/type_stack.rb', line 99 def pop(stack, node) stack.object_types.pop stack.path.pop end |
#push(stack, node) ⇒ Object
92 93 94 95 96 97 |
# File 'lib/graphql/static_validation/type_stack.rb', line 92 def push(stack, node) # eg, QueryType, MutationType object_type = stack.schema.root_type_for_operation(node.operation_type) stack.object_types.push(object_type) stack.path.push("#{node.operation_type}#{node.name ? " #{node.name}" : ""}") end |