Repository navigation
Commit 6076716
committed
Fail with an error naming the cycle when unions contain themselves
getLeafUnionObjects expanded nested unions recursively without tracking which ones it was already expanding, so a union that lists itself, directly or through another union, overflowed the stack. It now keeps the path of unions it is expanding and throws a SchemaError that names the cycle and points at the member that closes it.1 parent 6a6a869 commit 6076716
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
| |||
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
359 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
360 | 368 | | |
361 | 369 | | |
362 | 370 | | |
| |||
0 commit comments