© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
10 replies
Jesse

Trying to use types from js-v2 returns databases but not rows

import { SupabaseClient } from "@supabase/supabase-js";
import type { Database } from "../types";
import { useContext } from "react";
import { Context } from "../context";

export const Context = createContext<SupabaseClient<Database> | undefined>(
  undefined
);

export const useSupabaseClient = (): SupabaseClient<Database> => {
  const client = useContext(Context);
  if (client === undefined)
    throw Error("No client has been specified using Provider.");
  return client;
};
import { SupabaseClient } from "@supabase/supabase-js";
import type { Database } from "../types";
import { useContext } from "react";
import { Context } from "../context";

export const Context = createContext<SupabaseClient<Database> | undefined>(
  undefined
);

export const useSupabaseClient = (): SupabaseClient<Database> => {
  const client = useContext(Context);
  if (client === undefined)
    throw Error("No client has been specified using Provider.");
  return client;
};

 const { data, error } = await supabase.from("account").select(");
 const { data, error } = await supabase.from("account").select(");


The from is autofilled by my IDE, but when selecting, it will only suggest *, not the rows. They do exist in the types.ts. Anything I am missing?
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

Generate Types From the Cloud V2
SupabaseSSupabase / help-and-questions
4y ago
upgreded to supabase v2, but can't see any types from my data?
SupabaseSSupabase / help-and-questions
4y ago
Request that returns random rows
SupabaseSSupabase / help-and-questions
4y ago
RPC Call Returns Zero Rows But Function Works as Expected
SupabaseSSupabase / help-and-questions
4y ago