TS Type for column returned by PostgREST is incorrect
I've got a select query which is returning a column which is self-referential and it's working however the column being returned is typed as an array of the object rather than the actual object being returned. Anyone know how to fix this?
Eg.
In this example,
Any ideas?
Eg.
In this example,
revision_of_build_id is referencing builds.id . The actual data coming back correctly has all build columns on the row + a revision key which correctly shows a single build row. The problem is that the TS type for data thinks that the value of the revision key is an array of builds rather than a single row object. I would be fine with revision actually returning an array of 1 to match the type, the tough part is that it's returning an object . Any ideas?