You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there's a typing issue when querying children of a row. I'm relatively new so this could possibly be user error, but I received no feedback via Discord nor StackOverflow.
To Reproduce
I have the following generated (from supabase-cli) type for my collections table:
In particular, collections is typed as an object, not an array of objects. However, if I coerce the typing to be any, collections is an array as expected, so this is just an issue with the generated type. Any clues on what I've done wrong or how to fix things?
System information
OS: Windows
Browser: Chrome
Version of supabase-js: 2.38.5
Version of Node.js: 10.1.0
Dev environment: GitHub Codespaces
The text was updated successfully, but these errors were encountered:
From what I understand, on a self-referential relationship on a relation collection, when encountering a query like *, collection(*), PostgREST actually prioritizes the foreign relationship (i.e. from-many reference), since the local reference (i.e. to-one reference) can be specified with the column name e.g. *, parent_id(*).
Bug report
Describe the bug
I believe there's a typing issue when querying children of a row. I'm relatively new so this could possibly be user error, but I received no feedback via Discord nor StackOverflow.
To Reproduce
I have the following generated (from supabase-cli) type for my
collections
table:I'm grabbing a particular collection like so:
And this is the typing that's been inferred:
Expected behavior
In particular,
collections
is typed as an object, not an array of objects. However, if I coerce the typing to beany
,collections
is an array as expected, so this is just an issue with the generated type. Any clues on what I've done wrong or how to fix things?System information
The text was updated successfully, but these errors were encountered: