Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’4y agoβ€’
10 replies
xvvvyz

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 banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RPC call return type in TypeScript not nullable
SupabaseSSupabase / help-and-questions
2w ago
Timeout on RPC Call
SupabaseSSupabase / help-and-questions
3mo ago
Typescript return type for Functions
SupabaseSSupabase / help-and-questions
4y ago
Best way to store a image in storage with additional data
SupabaseSSupabase / help-and-questions
4y ago