[Bug] FindManyArgs could have both `include` and `select` defined without showing error
Maintainers usually reply within 1 day
@Sohail52 is already working on this.
Since Jul 4, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- backend
Research direction
The issue shows FindManyArgs accepts both include and select while the runtime rejects that pair. No file is named in the payload, so start from where ZenStack generates the model query types (the UserFindManyArgs definition) and reproduce the snippet in a type-level test. Done means the generated type makes include and select mutually exclusive, matching Prisma, with a regression test asserting the type error.
Written by the indexing model from the issue text.
Description
Description and expected behavior
The below code would pass type checking but shows runtime error instead:
const args = {
include: { posts: true },
select: { email: true },
} as UserFindManyArgs;
db.user.findMany(args);
Environment (please complete the following information):
- ZenStack version: v3
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 157
- Avg merge
- 11h 42m
- Merged PRs (30d)
- 20
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from zenstackhq/zenstack
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zenstackhq/zenstack#2873 ·
Maintainers usually reply within 1 day
-
runtime
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zenstackhq/zenstack#2868 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
zenstackhq/zenstack#2694 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
zenstackhq/zenstack#2659 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
zenstackhq/zenstack#2542 · 1 comment ·
Maintainers usually reply within 1 day
All issues in zenstackhq/zenstack
Similar issues
-
area:tui enhancement platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
anthropics/claude-code#101490 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
netlify/netlify-mcp#75 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
atlassian-labs/compiled#1960 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
pnp/cli-microsoft365#7639 ·
Maintainers usually reply within 2 days
-
nextjs-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cloudflare/vinext#3887 ·
Maintainers usually reply within 1 day