AdamGTA
Convex Community14mo ago
5 replies
AdamGT

...authTables not showing in api client

Even though I added the ...authTables to the schema they are not showing in the api client but they are showing on the website
import { defineSchema, defineTable } from "convex/server";
import { authTables } from "@convex-dev/auth/server";
import { v } from "convex/values";

const schema = defineSchema({
  ...authTables,
  shirt: defineTable({
    intro: v.boolean(),
    color: v.string(),
    tweetLink: v.string(),
    userId: v.optional(v.id("users")),
  }),
});

export default schema;

  const user = useQuery(api.users.viewer);

the query above is giving this error "property users not exist on type ... all the above tables except the authTables"
Was this page helpful?