NARCISO
04/21/2022, 1:00 PMRPC parameters
(calling RPC from the supabase-js
client) are sorted by name (alphabetically) before calling the database function?
Is this a feature or something that can be disabled? or am I forced to sort my RPC's params in that way?Needle
04/21/2022, 1:00 PM/title
command!
We have solved your problem?
Click the button below to archive it.Needle
04/21/2022, 1:01 PMsilentworks
04/21/2022, 1:39 PMNeedle
04/21/2022, 1:39 PMNARCISO
04/21/2022, 2:25 PMsupabase-js
client sent a POST request with the following RAW body:
{
"sender_user_id": "3c6bc0b0-dad2-4e5d-a3e9-4c3a177d9442",
"recipient_user_id": "034319ea-968d-4815-8a99-e7af2bc371c0",
"content": "TEISTI JWAOID",
"correlated_offer_id": null,
"work_proposal_id": null
}
In the UI of the Network Tab inside Firefox, you can see (in the attached image) the parameters sorted in a different way.Sure it is just a browser thing to display the fields sorted, but it's actually strange because then I get the following error in response:
"Could not find the public.create_message(content, correlated_offer_id, recipient_user_id, sender_user_id, work_proposal_id)
function or the public.create_message function with a single unnamed json or jsonb parameter in the schema cache".
The real function arguments:
sender_user_id uuid,
recipient_user_id uuid,
maybe_conversation_id uuid,
content text,
correlated_offer_id uuid,
work_proposal_id uuid
The problem is there where it seems that the request is sorting the arguments and therefore the RPC function is called with a wrong order of the params.NARCISO
04/21/2022, 2:38 PMNARCISO
04/24/2022, 3:07 PMNeedle
04/24/2022, 3:07 PMMartin INDIE MAKERS
05/31/2022, 5:55 PM