nahtnam
06/13/2022, 2:47 AM.eq
method doesn't support joined tables. Could someone help me out? I'll include details in the threadNeedle
06/13/2022, 2:47 AMnahtnam
06/13/2022, 2:48 AMnahtnam
06/13/2022, 2:48 AMts
const shape = getShape<definitions["posts"] & { unsplash_category_snapshots: definitions["profiles"]}>()({
"*": true,
users: {"_": "profile_id", "*": true}
});
await supabaseClient
.from<typeof shape>("posts")
.select(getFields(shape))
.eq("profiles.email", "asdf@gmail.com")
.limit(1)
nahtnam
06/13/2022, 2:49 AM.eq("user.email"
line saying that user.email
is not a valid optionnahtnam
06/13/2022, 2:49 AM.eq
might need to be updated to use the template strings feature in typescript, but I'm not sure. Does anyone have any workarounds other than // @ts-ignore
?garyaustin
06/13/2022, 4:05 AMnahtnam
06/13/2022, 5:28 AMusers.email
(these arent my table names, I just changed them to make it easier to understand)nahtnam
06/13/2022, 5:28 AMnahtnam
06/13/2022, 5:28 AMauth
schema, let me rename it to profiles
so it makes more sense 🙂nahtnam
06/13/2022, 5:30 AM.eq
it expects the first parameter to be a column of the posts
table, I couldnt figure out a way to have it accept profiles.email
which is valid postgrest but fails tsnahtnam
06/13/2022, 7:35 AMnahtnam
06/13/2022, 7:35 AM.from<typeof shape & {"profiles.email": string}>("posts")
Needle
06/14/2022, 3:49 AM