Skip to content

Commit dcbca77

Browse files
committed
docs: clarify usage instructions for separate-repo setups in README files
1 parent 5bb8648 commit dcbca77

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ const client = createDrizzleClient({
4646
})
4747
```
4848

49-
### From Schema Descriptor
49+
### From Schema Descriptor (separate-repo setups)
5050

51-
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.
5252

5353
```ts
5454
import { createClient } from 'drizzle-graphql-suite/client'

packages/schema/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ query {
321321

322322
## Code Generation
323323

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+
324326
Three code generation functions for producing static artifacts from a GraphQL schema:
325327

326328
### `generateSDL(schema)`
@@ -354,7 +356,7 @@ writeFileSync('generated/types.ts', types)
354356

355357
### `generateEntityDefs(schema, options?)`
356358

357-
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.
358360

359361
```ts
360362
import { generateEntityDefs } from 'drizzle-graphql-suite/schema'

0 commit comments

Comments
 (0)