Return values for supabase.rpc
See original GitHub issueThe docs say the return values of supabase.rpc
are { data, error }
. But I am getting the return values as { body, status, statusCode, statusText }
// this works
const { body, status, statusCode, statusText } = await supabase.rpc('funcName', params);
// this doesn't
const { data, error } = await supabase.rpc('funcName', params);
Should we update the docs? Or we can consider changing the return values to data and error to keep it consistent with the other supabase-js functions.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Call a Postgres function - Supabase
You can call Postgres functions as Remote Procedure Calls, logic in your database that you can execute from anywhere. Functions are useful when...
Read more >Custom function query returns different value from RPC call
Custom function query returns different value from RPC call. ... const { data, error } = await supabase.rpc("get_daily_mr_counts", ...
Read more >Supabase - RPC function returning null instead of values
I've created a Supabase RPC function in order to process a structured query on my Supabase database and in order to call the...
Read more >Using Stored Procedures (RPC) in Supabase to Increment a ...
In my recent side project, Lila, I wanted a simple way to increment a “Like” counter for the quotes on the site. As...
Read more >Dynamic RPC function : r/Supabase - Reddit
I am looking to create an RPC for grabbing distinct values of a column but I am going to be doing this across...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just a patch release - we won’t remove
body
, we will just assign it todata
too. But we will need to make sure the change is coming frompostgrest-js
, then bubbling up through supabase-js.Ohh, I was using it in
monitoring
and looks like it is still on supabase-js v0.35.10. My bad…closing the issue!