Skip to content

mutations: specifying the type for errors #285

@michael-small

Description

@michael-small

Currently, the type for mutation errors is just unknown. So whether you are awaiting a mutation or just accessing the error in onError, you must cast or narrow your error if its type is knowable.

This issue is to track adding an error typing functionality. I have picked this up formally, but feel free to discuss.

To avoid breaking changes, we are thinking of adding an inferError: boolean which would be false for all versions <=21. And then in 22, it would default to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions