Skip to content

Allow type safe usage of useGqlError #468

@some-user123

Description

@some-user123

Your use case

When defining a custom error handler using useGqlError I'd like to write a type safe function, e.g.:

Instead of:

useGqlError((err) => {
    console.error(err)
 })

I want to write:

useGqlError((err: GqlError) => {
    // Access err in a type safe way...
 })

The solution you'd like

I'd like to import the type GqlError. Could not find a working export. (Ideally, this would be reflected in the docs)

Possible alternatives

No response

Additional information

No response

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