Skip to content

Save many-to-many relationships via js sdk #4081

Answered by mstade
wiesson asked this question in Questions
Discussion options

You must be logged in to vote

Sadly, not as far as I know. You'd have to write a database function that you could call with your inputs, and have that do the inserts and all in a transaction, otherwise you have to do multiple Supabase calls using the results of previous calls. It's unfortunate and not very performant since it creates a waterfall like profile, but it's the way it is.

Writing functions isn't that bad though, and you can even use JavaScript if you enable the v8 extension. Calling them using the Supabase client is also very easy.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@soedirgo
Comment options

@wiesson
Comment options

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