Commit b3ed86d
committed
fix(api-gateway): Handle array format for joins in /meta?extended endpoint
After PR #9800, joins are stored as arrays instead of objects in the
schema compiler. The transformJoins function in the API gateway was
still using Object.entries() which, when applied to arrays, returns
numeric indices as keys instead of actual join names.
This fix:
- Checks if joins is an array and preserves the name property
- Maintains backward compatibility with object format
- Adds test coverage for both array and object formats
Fixes the issue where join names appear as "0", "1", "2" instead of
their actual names in the /meta?extended endpoint response.1 parent 26e477b commit b3ed86d
File tree
2 files changed
+34
-0
lines changed- packages/cubejs-api-gateway
- src/helpers
- test/helpers
2 files changed
+34
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
222 | 246 | | |
223 | 247 | | |
224 | 248 | | |
| |||
0 commit comments