module GraphQL::StaticValidation::TypeStack::FieldStrategy
Public Instance Methods
pop(stack, node)
click to toggle source
# File lib/graphql/static_validation/type_stack.rb, line 122 def pop(stack, node) stack.field_definitions.pop stack.object_types.pop stack.path.pop end
push(stack, node)
click to toggle source
# File lib/graphql/static_validation/type_stack.rb, line 107 def push(stack, node) parent_type = stack.object_types.last parent_type = parent_type.unwrap field_definition = stack.schema.get_field(parent_type, node.name) stack.field_definitions.push(field_definition) if !field_definition.nil? next_object_type = field_definition.type stack.object_types.push(next_object_type) else stack.object_types.push(nil) end stack.path.push(node.alias || node.name) end