© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago
icanflyit

Drizzle client nested schemas

Is there a way to nest schemas within the Drizzle Queries? I have my schemas multiple files in sub directories, and I export them in groups.
export * as paths from './schema/paths';
export * as reports from './schema/reports';
export * as auth from './schema/auth';
export * as paths from './schema/paths';
export * as reports from './schema/reports';
export * as auth from './schema/auth';


This helps with organization and works with the select and insert, but to use queries I have to spread my schema when passing it to drizzle.

Ideally, I'd be able to query users like
await client.query.auth.users.findMany()
await client.query.auth.users.findMany()
vs.
await client.query.users.findMany()
await client.query.users.findMany()

Is this possible in drizzle?
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Importing drizzle-zod Schemas on the Client
Drizzle TeamDTDrizzle Team / help
3y ago
How to import drizzle-zod schemas on the client
Drizzle TeamDTDrizzle Team / help
6mo ago
Drizzle-zod schemas included in bundle
Drizzle TeamDTDrizzle Team / help
4mo ago
im getting problems with drizzle schemas
Drizzle TeamDTDrizzle Team / help
14mo ago