FeatureFuel
1

Types and generic `from<T>`

Source: supabase/supabase#6816 · opened by @AlbinoGeek
Synopsis The types in @supabase/supabase-js such as User don't quite line up with .from<T>(string) don't quite line up with their usage, such as .eq('email_confirmed_at', null). Description So, say we use a type like User from @supabase/supabase-js Then we write a query using one of the "possibly undefined" fields: Now, unfortunately, this fails ESLint, because null isn't a valid value for email_confirmed_at. The same thing happens when using Update. Possible Solutions Maybe eq and other comparators should accept T | null as it's value, so that null is always a valid value? --- This is an idea versus an issue, because I'm not sold on this being the solution. I'd rather someone who uses supabase more than me weigh in on the implications of such a change. Disclaimer: Yes, I'm aware User might not be the best example, since auth is a private collection, but this applies to all types that…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests