© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
16 replies
LukasV

upgreded to supabase v2, but can't see any types from my data?

Before v2, I would add a type next to the .from() method like this:
  const { data, error } = await supabase
    .from<ProductTypeHere>('products')
  const { data, error } = await supabase
    .from<ProductTypeHere>('products')

But now, it supposed to know the types automatically when initialize client like this:

import type { Database } from 'types_db';

export const supabase = createBrowserSupabaseClient<Database>();
import type { Database } from 'types_db';

export const supabase = createBrowserSupabaseClient<Database>();


But, as you can see from the picture, I get
any[] | null
any[] | null
as a return instead of my database type.

How can I get return types for my data?
Screenshot_2022-10-23_at_01.33.09.png
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

Supabase migration applied to remote but can't see table
SupabaseSSupabase / help-and-questions
2mo ago
Don't see any organizations in my supabase account
SupabaseSSupabase / help-and-questions
5d ago
Trying to use types from js-v2 returns databases but not rows
SupabaseSSupabase / help-and-questions
4y ago
I use lovable with supabase and in supabase I can't see my database
SupabaseSSupabase / help-and-questions
3mo ago