Skip to content

useLazyQuery ignores request if one is in progress (or how to cancel running requests) #213

@dominictobias

Description

@dominictobias

Hi,

I'm using useLazyQuery for a user lookup for suggestions, so it's important that requests aren't missed.

The default behaviour it seems is that requests are ignored if one is happening - I would like to cancel running requests and fire the new one.

At the moment if I type "Dominic Tobiaz" and then correct it to "Dominic Tobias", the request will be ignored if the misspelled one is still running.

The useLazyQuery request function sadly is not returning the fetch Promise for me to be able to cancel, nor have I had any luck with fetchPolicy: 'network-only'.

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions