Skip to content

Do not type nullable fields with undefined within @throwOnFieldError and @catch #4971

@tobias-tengler

Description

@tobias-tengler

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions