Skip to content
Discussion options

You must be logged in to vote

Hi @link-discord!

Do you have security policy for select? If not, your case might be related to this issue supabase/postgrest-js#127

In short, by default when you insert data into Supabase, you are not only inserting, but selecting the data that you inserted, thus you need both insert and select rights for the inserted data. To fix this, you can either create security policy for select as well, or use returning: 'minimal' option like this:

await supabase.from('sample').insert({ key: 'value' }, { returning: 'minimal' })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@linkle69
Comment options

Answer selected by inian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants