Open bombillazo opened 10 months ago
I think the issue is the column name, once the name does not match the foreign table name, the query breaks down for relations.
ok, it works if I use account(*)
, the query sees the foreign fields, but how can I specify I want to query both big and small accounts ?
Bug report
Describe the bug
Given a schema types definition for a table like so:
When querying data from
my_resource
, one gets errors or an empty type:This only happens when one tries to query data using relations in a query; the
account
type works fine when querying it directly. It also works on other table types where the foreign key id is calledaccount_id
instead of not matching the foreign table name +_id
.To Reproduce
foreign_table
+_id
(*)
Expected behavior
The correct types are produced based on the relationships generated by the Supabase DB schema.
Screenshots
System information