Best way to specify type for rpc call response data in TypeScript?
π‘javascript
const { data } = await supabase.rpc( 'upsert_subject_with_observations', // ...);// Property 'id' does not exist on type 'string[]'.console.log(data?.id);
const { data } = await supabase.rpc( 'upsert_subject_with_observations', // ...);// Property 'id' does not exist on type 'string[]'.console.log(data?.id);
Function signature looks like this:
public.upsert_subject_with_observations( in observation_ids uuid[], in subject subjects, out id uuid)
public.upsert_subject_with_observations( in observation_ids uuid[], in subject subjects, out id uuid)
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.