Skip to content

Failure to deduplicate network requestsΒ #169

@roel-de-jong-iqvia

Description

@roel-de-jong-iqvia

Which @ngneat/query-* package(s) are the source of the bug?

query

Is this a regression?

Yes

Description

Given

There are multiple components which "use" a query a single time (take(1))

When

  • a query is inactive, and has no observers,
  • the query is invalidated twice by (pressing the invalidate button twice)
  • there is an event which triggers a query in multiple components (also triggered by invalidate button),

Then

Expected: a single network request is initiated
Actual: It appears requests are not de-duplicated, and the network tab shows multiple canceled queries.

image

When I continuously observe the query, only a single network request is fired.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/~/github.com/roel-de-jong-iqvia/request_deduplication

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

No response

Do you want to create a pull request?

Yes

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