I have a dropdown menu that lists the workspaces that the logged-in user is a part of, and I would like to set an onchange action that makes an RPC call to my set_active_workspace(workspace_id) function in Weweb.
The Supabase documentation is not comprehensive on how to set all the necessary permissions to connect to the database, call the function, and link the call to the logged-in user.
Hopefully @Alexis will bless us with a functionality to call functions natively, also for Edge Functions, in the upcoming WeWeb’s Supabase Plugin update.
You can also call functions via the exposed Supabase instance, for more versatility, but I don’t think you’d want to do that, as it’s some code actually.
Hi, what do you have in result.key?
I tried with a function of mine but it’s returning empty value. There’s no RLS enabled
On Supabase, the logs says 200, which is successful
Hello, it’s the same process, you just need to set your RLS up, if you’re calculating that into your function as well, to allow the anon users to make changes or whatever you’re doing with the function. Or you can use the security INVOKER way, but it’s discouraged to use the security INVOKER.