Skip to content
Source
Sign inSign up
TanStack/query

useInfiniteQuery causes NotifyEventQueryObserverOptionsUpdated event to be fired without query set #6933

Closedmrlika(GitHub profile, opens in a new tab) opened this issue 0 comments

Describe the bug

useInfiniteQuery causes NotifyEventQueryObserverOptionsUpdated event to be fired without query parameter set that breaks types.

image

interface NotifyEventQueryObserverOptionsUpdated extends NotifyEvent {
    type: 'observerOptionsUpdated';
    query: Query<any, any, any, any>;
    observer: QueryObserver<any, any, any, any, any>;
}

The issue is missing in 5.21.2 but appears after updating to 5.21.4, so most likely this PR introduces it: https://github.com/TanStack/query/pull/6879

Your minimal, reproducible example

https://stackblitz.com/edit/stackblitz-starters-kx6qgr?file=src%2FApp.tsx

Steps to reproduce

The issue is missing in 5.21.2 but appears after updating to 5.21.4

Expected behavior

NotifyEventQueryObserverOptionsUpdated should be fired with the query parameter set.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

Linux

Tanstack Query adapter

None

TanStack Query version

5.21.4+

TypeScript version

latest

Additional context

No response

  1. TkDodo added labelsbug

  2. TkDodo added labelspackage: query-core

  3. mrlika(GitHub profile, opens in a new tab) changed the title

  4. mrlika(GitHub profile, opens in a new tab) changed the title

  5. TkDodo closed this

Sign in to join this conversation.