drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: built in dataloaders for including relations
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
Prisma will automatically batch load queries that occur on the same tick. In order for me to cut over from Prisma, I have to manually create dataloaders for each subresolver in my GraphQL schema. It would be great if Drizzle also did this by default.
You can read more in the Prisma docs:
[Solving the n+1 problem](https://www.prisma.io/docs/orm/prisma-client/queries/query-optimization-performance#solving-the-n1-problem)
Contributor guide
Research direction
Start with the linked Prisma documentation on solving the N+1 problem and review how relation fields are resolved in the GraphQL schema. Determine the expected batching behavior for relation loads occurring on the same tick, then define tests covering repeated relation requests and verify that the resulting query count is reduced without requiring manually created dataloaders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100