MichalLytek / MichalLytek/typegraphql-prisma

generate with redundant types broken for `ArgsInfo` + `enchance`

Open
#462 0 comments 0 reactions 0 assignees View on GitHub
bug community
Dominant language
TypeScript
Stars
918
Forks
130
PR merge metrics
No merged PRs in 30d

Description

**Describe the Bug**
Building with esbuild and redundant types, I get `Error: Cannot determine GraphQL input type for 'take' of 'AggregateMyModelArgs' class. Is the value, that is used as its TS type or explicit type, decorated with a proper decorator or is it a proper input value?`

**To Reproduce**
Generate with redundant types and try to load/run using esbuild/not-tsc

**Expected Behavior**
No failure to get type using redundant types

**Environment (please complete the following information):**

- OS: [e.g. ubuntu 22]
- Node (e.g. lts)
- `"typegraphql-prisma": "0.28.0"`
- Prisma `5.18.0`
- ts `"typescript": "~5.5.3",`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing generation with redundant types under esbuild or another non-tsc loader, using the reported AggregateMyModelArgs case. Inspect the generated ArgsInfo handling for the `take` field and trace the failing GraphQL input-type lookup; done means the generated output loads and runs without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
backend-api-design, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.