Can anyone tell me how to successfully implement this upsert statement? (It's from the supabase docs Supabase Javascript Client - Upsert data, but when I try to use onConflict in my custom action, it responds with these 2 errors:
Error: Undefined name 'onConflict'.
onConflict: 'handle'
^^^^^^^^^^
Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
.upsert({
^
await supabase
.from('users')
.upsert({ id: 42, handle: 'saoirse', display_name: 'Saoirse' }, { onConflict: 'handle' })