78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# File 'lib/graphql/static_validation/type_stack.rb', line 78
def push(stack, node)
parent_type = stack.object_types.last
parent_type = parent_type.kind.unwrap(parent_type)
if parent_type.kind.fields?
field_class = stack.schema.get_field(parent_type, node.name)
stack.field_definitions.push(field_class)
if !field_class.nil?
next_object_type = field_class.type
stack.object_types.push(next_object_type)
else
stack.object_types.push(nil)
end
else
stack.field_definitions.push(nil)
stack.object_types.push(parent_type)
end
end
|