fix(postgrest): correct self-reference inference#2525
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughReverse relationship resolution now treats column-matched relations as unambiguous and returns them directly, alongside the existing hint-based shortcut. Relationship tests add a self-referencing Assessment against linked issues
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
mandarini
left a comment
There was a problem hiding this comment.
Thank youuuu!!! :D
One thing I'd love to see before I merge: the new MultipleSelfReferencesDatabase type and lab table are hand-written and don't correspond to anything in our actual test database. Every other test in relationships.test.ts runs against the real schema in test/supabase/migrations/00000000000000_schema.sql, where collections only has a single self-referencing FK. The tests you added are compile-time only (the queries are built but never awaited), so nothing actually exercises this against a real PostgREST instance with two self-referencing FKs on the same table.
Would you be up for adding a second self-referencing FK to an existing table (or a small new one) in the migration, and turning at least the parents:parent(*) case into a runtime-executed test like the other self-reference tests in that file? That would give end-to-end confidence that this resolves the way we expect, not just that the types compile.
absolutely! 💚🙂 |
This PR updates `@supabase/supabase-js` to v2.110.7. **Source**: supabase-js-stable-release --- ## Release Notes ## v2.110.7 ## 2.110.7 (2026-07-16) ### 🩹 Fixes - **postgrest:** correct self-reference inference ([#2525](supabase/supabase-js#2525)) - **realtime:** trigger set auth on INITIAL_SESSION event ([#2531](supabase/supabase-js#2531)) - **realtime:** update phoenix to fix presence issue ([#2532](supabase/supabase-js#2532)) ### ❤️ Thank You - Eduardo Gurgel - Filipe Cabaço @filipecabaco - Vaibhav @7ttp This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
This PR updates @supabase/*-js libraries to version 2.110.8. **Source**: supabase-js-stable-release **Changes**: - Updated @supabase/supabase-js to 2.110.8 - Updated @supabase/auth-js to 2.110.8 - Updated @supabase/realtime-js to 2.110.8 - Updated @supabase/postgest-js to 2.110.8 - Refreshed pnpm-lock.yaml --- ## Release Notes ## v2.110.8 ## 2.110.8 (2026-07-21) ### 🩹 Fixes - **auth:** downgrade aborted/transient fetch failures from console.error to warn ([#2544](supabase/supabase-js#2544)) - **functions:** clean up cross-signal abort listener on invoke() return ([#2487](supabase/supabase-js#2487)) - **functions:** match response Content-Type case-insensitively ([#2515](supabase/supabase-js#2515)) - **storage:** url-encode object key in CDN purge methods ([#2545](supabase/supabase-js#2545)) - **supabase:** skip Node warning in Deno ([#2541](supabase/supabase-js#2541)) ### ❤️ Thank You - Franco Kaddour @FrancoKaddour - Katerina Skroumpelou @mandarini - Pedro Henrique - Vaibhav @7ttp ## v2.110.7 ## 2.110.7 (2026-07-16) ### 🩹 Fixes - **postgrest:** correct self-reference inference ([#2525](supabase/supabase-js#2525)) - **realtime:** trigger set auth on INITIAL_SESSION event ([#2531](supabase/supabase-js#2531)) - **realtime:** update phoenix to fix presence issue ([#2532](supabase/supabase-js#2532)) ### ❤️ Thank You - Eduardo Gurgel - Filipe Cabaço @filipecabaco - Vaibhav @7ttp This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
TL;DR
Extends #2520 to cover the remaining direct column self reference case in
2.110.6-canary.0parents:parent(*)works at runtime but was still typed asSelectQueryErrorwhen multiple self referencing FKs exist
Direct column matches now resolve correctly while real table name ambiguity errors remain covered
ref
basically the remaining case