Do not type nullable fields with `undefined` within `@throwOnFieldError` and `@catch`
Open
shared with relay team
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
With `@throwOnFieldError` or `@catch` applied, missing data i.e. `undefined` should no longer be possible to be read from a fragment or operation (besides conditional selections from my understanding), so couldn't we stop generating `Type | null | undefined` in those cases for nullable fields and model them just as `Type | null` instead?
This would also apply to the raw response type. A field there should only be typed as `undefined` if it's conditional.
Contributor guide
Assessment
This issue has not been assessed yet.