Skip to content

How do I use generated database types? #150

Description

@gergely-xyz

I would like to use the types generated with the supabase cli. #90 was closed as completed so I'm assuming this is possible, but I can't seem to make it work.

I've generated the types of my database:
supabase gen types typescript --linked > supabase/schema.ts

And added the following to my nuxt.config.ts:

import { Database } from './supabase/schema'
export default defineNuxtConfig({
// ...
  supabase: {
    client: {
      db: {
        schema: Database,
      },
    },
  },
// ...
}

The documentation references this for available options.
I expected type hints to show up as shown here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalequestionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions