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
@psteinroe Why do you think its a problem from the types? I think for the types it makes sense to make primary keys in updates typed a never to prevent updating primary keys. However, for this library its needed so it knows which row to update. In your test it looks like the types are generated differently, with which version did you generate it? Or maybe you defined the ID's differently in your postgres?
Ah that's a good point! The problem is that the types are never for generated ids. I am using uuids with a default, which generates a string | null. I don't know how to fix this from the top of my head without breaking the API of cache helpers unfortunately. But I will think about it.
Describe the bug
When using the following database definition:
The types generated for above table by the supabase cli are:
Update: {
id?: never
name: string
}
Ofcourse, above types makes the useUpdate mutation give:
Type 'number' is not assignable to type 'undefined'.
How should i define my postgres tables to make this work?
The text was updated successfully, but these errors were encountered: