SupabaseS
Supabase4y ago
Greg

reloading the schema cache

trying to call serverside function but getting error
code: 'PGRST202', details: null, hint: 'If a new function was created in the database with this name and parameters, try reloading the schema cache.', message: 'Could not find the public.public.getauthkey() function or the public.public.getauthkey function with a single unnamed json or jsonb parameter in the schema cache'

this is my function in app

export async function GetFirstAuthKey(user:any) { const { data, error } = await supabase.rpc('getauthkey', user.id) if (error) console.error(error) else console.log(data) }

and this was my function on supabase
'create or replace function getauthkey("pid" text)
returns text as
$$
select authkey from public.userprofile where id::text = pid;
$$ language sql;'

i added the "" around pid after some googleing but it also did not work before
unsure how to solve this one
Was this page helpful?