Open
Description
Improve documentation
Link
RPC section of the readme. https://github.com/supabase-community/supabase-custom-claims#getting-claims-data-from-the-server
Describe the problem
I can run the functions on the database in the supabase SQL editor. But when I try to run them in a server function in a Netlify serverless function I get an error saying:
Searched for the function public.get_claim with parameters claim, uuid or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.
Here is how I called the rpc.
const options = {
auth: {
persistSession: false,
autoRefreshToken: false,
detectSessionInUrl: false,
}
};
const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_API_KEY, options);
const { data, error } = await supabase
.rpc('get_claim', {uuid, claim});
I would expect if it were an auth problem I would get an authentication error.
I tried to reset the schema cache with NOTIFY pgrst, 'reload schema';
But it didn't change anything.