Skip to content

Pending queries not notified on timeout (Apollo) #42

@arjan

Description

@arjan

It seems that when a query takes longer than 10 seconds, the phoenix channel times out (10s is the default timeout when expecting a response to .push()).

When this happens, the query keeps being stuck in the networkStatus = 1 state (request pending), instead of that an error is pushed up the Apollo link chain.

I tracked it down to the pushRequestUsing function, where the onTimeout handler calls notifyActive(), whereas the onError handler calls abortNotifier. When I change the onTimeout to call abortNotifier(), all works as expected.

Is this something worth PR'ing or is there a different approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions