Repository navigation
fix(graphql): keep nested payload data past the escaping depth limit - #13533
Conversation
escapePayload() returned null once the depth guard tripped, and the caller assigns that result straight back into the parent array, so every value below _APP_GRAPHQL_MAX_DEPTH was replaced with null instead of merely being left unescaped. Return the payload untouched instead. Escaping also ran before the recursion, so an array held under a $-prefixed key was written unrecursed to the escaped key and then restored under the original key by the recursion step, leaving both keys in the payload. Recurse first, then escape, so each key is written once.
Greptile SummaryThis PR corrects GraphQL payload escaping so data beyond the configured recursion limit is preserved and array-valued
Confidence Score: 5/5The PR appears safe to merge, with the prior test-isolation finding resolved and no new actionable defects identified. The resolver now returns nested payload data unchanged beyond the configured depth and performs recursion before renaming array-valued system keys. The remaining E2E assertions cover both corrected behaviors, and the previously state-dependent users test now creates and filters for its own user. Important Files Changed
Reviews (7): Last reviewed commit: "test(graphql): keep payload regressions ..." | Re-trigger Greptile |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
The cached user is shared with the rest of the suite, so how many targets it carries depends on which tests ran first. Create one here instead.
Closes #11897
What does this PR do?
Preserves nested GraphQL response data beyond the escaping depth limit instead of replacing it with null. It also recurses before renaming array-valued
$keys, preventing the original keys from being recreated alongside the escaped keys. This keeps raw$permissionsout of GraphQL row data while preserving_permissions.Test Plan
UsersTest::testGetUsersto check that the listed user's nested email target survives.TablesDB/DatabaseServerTest::testGetRowto check_permissionsand reject duplicated$permissionsinsidedata.Both focused E2E tests fail against the original resolver and pass with the fix (21 and 47 assertions). Pint, PHP syntax checks, and the focused Rector dry run pass.