Module: GraphQL::StaticValidation::TypeStack::OperationDefinitionStrategy
- Defined in:
- lib/graphql/static_validation/type_stack.rb
Class Method Summary collapse
Class Method Details
.pop(stack, node) ⇒ Object
100 101 102 103 |
# File 'lib/graphql/static_validation/type_stack.rb', line 100 def pop(stack, node) stack.object_types.pop stack.path.pop end |
.push(stack, node) ⇒ Object
93 94 95 96 97 98 |
# File 'lib/graphql/static_validation/type_stack.rb', line 93 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 |