Incorrect TS typing on result
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
This query (note `owner { handle` part and IDE showing `!`):

Leads to this incorrectly type generated (note `readonly owner?: {`!):

Additional details:
Used here:

Leading to type error in code that is impossible:

And here is our GraphQL Schema (note line 1640):

Contributor guide
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.
Research direction
Start by reproducing the query and comparing its generated TypeScript result type with the GraphQL schema shown at line 1640. Trace the generation path that makes owner optional, then add or update the relevant regression coverage so the generated type matches the schema and the impossible type error is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100