We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Spreading related tables, as described in this article , are not properly typed.
const { data } = await supabase.from('films').select(` title, ...technical_specs ( camera, laboratory, duration ) `) console.log(data)
yields ParserError<"Expected identifier at ...technical_specs (camera, laboratory, duration)
ParserError<"Expected identifier at ...technical_specs (camera, laboratory, duration)
Steps to reproduce the behavior, please provide code snippets or a repository:
The type should be {title: string, camera: string, laboratory: string, duration: string}[] | null
{title: string, camera: string, laboratory: string, duration: string}[] | null
The text was updated successfully, but these errors were encountered:
No update on this? @masda70 did you find a workaround or did you just use .returns<...>() ?
.returns<...>()
Sorry, something went wrong.
@nielsvanrijn I ended up not using the spread operator. I did retry using it 2 months ago, but noticed no difference in behavior.
This should be fixed in #497, which was released just about 2 months ago. If you upgrade to the latest version, this should be working fine.
The fix has been released in supabase-js v2.46.0. I'm closing this issue, but feel free to reopen if you encounter any further errors.
supabase-js
No branches or pull requests
Bug report
Describe the bug
Spreading related tables, as described in this article , are not properly typed.
yields
ParserError<"Expected identifier at ...technical_specs (camera, laboratory, duration)
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
The type should be
{title: string, camera: string, laboratory: string, duration: string}[] | null
System information
The text was updated successfully, but these errors were encountered: