You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `createClient` with a codegen-generated schema descriptor when you want to decouple from the Drizzle schema at runtime (e.g., in a frontend bundle that shouldn't import server-side schema files).
51
+
Use `createClient` with a codegen-generated schema descriptor when the client is in a separate repository that can't import the Drizzle schema directly.
Copy file name to clipboardExpand all lines: packages/schema/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -321,6 +321,8 @@ query {
321
321
322
322
## Code Generation
323
323
324
+
> **When to use:** Only when the client is in a separate repository that cannot import the Drizzle schema directly. For same-repo setups, [`createDrizzleClient`](../client/README.md) infers all types automatically — no codegen needed.
325
+
324
326
Three code generation functions for producing static artifacts from a GraphQL schema:
Generates a runtime schema descriptor object and `EntityDefs` type for the client package. This is an alternative to `createDrizzleClient`— useful when you want to ship pre-built schema metadata.
359
+
Generates a runtime schema descriptor object and `EntityDefs` type for the client package. Use this instead of `createDrizzleClient`when the client is in a separate repo and can't import the Drizzle schema.
0 commit comments