Skip to content

ParserError: Expected identifier at ) when using relation with no columns selected #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
vladshcherbin opened this issue Jul 19, 2023 · 2 comments · Fixed by #499
Closed
2 tasks done
Labels
enhancement New feature or request released

Comments

@vladshcherbin
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When using anti-join and not selecting any columns, ParserError is shown.

Query:

await supabase
  .from('cars')
  .select('id, car_images()')
  .is('car_images', null)

Error:

image

The query is working and returns correct results, only typescript is showing this error with no types as a result. After adding any field (for example car_images(id)) the error disappears and typings are correct.

Article with similar example (nominations relation): https://supabase.com/blog/postgrest-11-prerelease#anti-joins

Expected behavior

No typescript typings error, return type should not have this relation.

Screenshots

image

System information

  • OS: macOS
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: 2.26.0
  • Version of Node.js: 18.16.0
  • Version of Typescript: 5.1.6
@vladshcherbin vladshcherbin added the bug Something isn't working label Jul 19, 2023
@steve-chavez steve-chavez transferred this issue from supabase/supabase-js Jul 19, 2023
@soedirgo
Copy link
Member

Thanks @vladshcherbin! This is a new feature from PostgREST v11 (using nested() in v10 would result in an error), so flagging this as a feature request.

@soedirgo soedirgo added enhancement New feature or request and removed bug Something isn't working labels Jul 21, 2023
bnjmnt4n added a commit to bnjmnt4n/postgrest-js that referenced this issue Nov 5, 2023
bnjmnt4n added a commit to bnjmnt4n/postgrest-js that referenced this issue Nov 5, 2023
bnjmnt4n added a commit to bnjmnt4n/postgrest-js that referenced this issue Feb 8, 2024
bnjmnt4n added a commit to bnjmnt4n/postgrest-js that referenced this issue Feb 23, 2024
bnjmnt4n added a commit to bnjmnt4n/postgrest-js that referenced this issue Feb 29, 2024
Copy link

🎉 This issue has been resolved in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants