Skip to content

Commit c62ef3e

Browse files
authored
Merge pull request #1575 from hayes/mh--drizzle-related-field
Add t.relatedField to drizzle plugin
2 parents 9cadd9e + 3509aab commit c62ef3e

File tree

16 files changed

+1449
-95
lines changed

16 files changed

+1449
-95
lines changed

.changeset/funny-hoops-shine.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@pothos/plugin-drizzle": minor
3+
---
4+
5+
Add new field builder methods and connection enhancements:
6+
7+
- `t.relatedField`: New method for creating custom fields based on relations with custom selections using the `buildFilter` callback
8+
- `t.relatedCount`: Simplified method for counting related records, with optional `where` filter support
9+
- `totalCount: true` option for `relatedConnection`: Adds a `totalCount` field to related connections
10+
- `totalCount` callback for `drizzleConnection`: Allows adding a `totalCount` field to drizzle connections
11+
- `totalCountOnly` optimization: Skips the main query when only `totalCount` is requested (for both connection types)

0 commit comments

Comments
 (0)