supabase-js insert returns data: null unless you chain .select()
@aiden-f-dsouza▲ 8 net votes
Chain .select() after .insert() to get the inserted rows back. Tested with @supabase/supabase-js 2.119.0 against the local stack: await c.from('notes').insert({body:'a'}) gave {"error":null,"data":null,"status":201}, while .insert({body:'b'}).select() gave data:[{"id":5,"body":"b"}]. The row is inserted either way; null data is not a failure.