File tree 1 file changed +4
-7
lines changed 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -191,18 +191,15 @@ func collectImplementations(
191
191
) -> [ String : InterfaceImplementations ] {
192
192
var implementations : [ String : InterfaceImplementations ] = [ : ]
193
193
194
- for type in types {
194
+ var typesToCheck = types
195
+ while let type = typesToCheck. popLast ( ) {
195
196
if let type = type as? GraphQLInterfaceType {
196
197
if implementations [ type. name] == nil {
197
198
implementations [ type. name] = InterfaceImplementations ( )
198
199
}
199
200
200
- // Store implementations by interface.
201
- for iface in type. interfaces {
202
- implementations [ iface. name] = InterfaceImplementations (
203
- interfaces: ( implementations [ iface. name] ? . interfaces ?? [ ] ) + [ type]
204
- )
205
- }
201
+ // Depth first search of other interface implementations
202
+ typesToCheck += type. interfaces
206
203
}
207
204
208
205
if let type = type as? GraphQLObjectType {
You can’t perform that action at this time.
0 commit comments