© 2026 Hedgehog Software, LLC

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

supabase v2 fails to retrieve type definitions

I am trying to get some data from my
products
products
collection, but the return type is:
const data: any[] | null
const data: any[] | null

instead of the type that I gave in my
Database
Database
type, why is that?

here is the code:

import type { Database } from 'types_db';

export const supabase = createBrowserSupabaseClient<Database>();

export const getActiveProductsWithPrices = async (): Promise<
  ProductWithPrice[]
> => {
  const { data, error } = await supabase
    .from('products')
    .select('*, prices(*)')
import type { Database } from 'types_db';

export const supabase = createBrowserSupabaseClient<Database>();

export const getActiveProductsWithPrices = async (): Promise<
  ProductWithPrice[]
> => {
  const { data, error } = await supabase
    .from('products')
    .select('*, prices(*)')


Can someone please confirm, that this is a bug?
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 v2 - type returned is undefined[] | undefined
SupabaseSSupabase / help-and-questions
4y ago
supabase-js v2 Database type creating intellisense issues
SupabaseSSupabase / help-and-questions
4y ago
How to retrieve Supabase MCP Server URL?
SupabaseSSupabase / help-and-questions
7mo ago
Supabase v2 - Slack provider
SupabaseSSupabase / help-and-questions
4y ago