Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Query stuck in loading state when rendered after a query or a network error #3090

@ducarroz

Description

@ducarroz

Description
When a <Query> component which has previously resulted in a qraphQL or network error is re-rendered, its state changes from error to loading and no request is executed. The component is now stuck in loading state.

Intended outcome:
If the query variables do not change, the <Query> stay in error state. Else the state change to loading and a new request is executed (cache or network).

Actual outcome:
The <Query> component's state changes to loading and no request is executed, whatever the query's variables change or not.

How to reproduce the issue:
I made a sample project to demonstrate the issue at https://codesandbox.io/s/apolloquerystuckaftererror-heyxu

  1. open https://codesandbox.io/s/apolloquerystuckaftererror-heyxu
  2. click on 'Next' and wait for response (300ms)
  3. click on 'GQL Error' or 'Link Error' and wait for response (300ms)
  4. click on 'Next' or 'Same'
    ==> <Query> stuck in loading state

Version

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions