Skip to content
Source
Sign inSign up
TanStack/query

Infinite query error when getNextPageParam is not after queryFn #7222

Send to my agent
Closedhosmelq(GitHub profile, opens in a new tab) opened this issue 3 comments
  1. TkDodo added labelstypes

  2. On the spot, I'm not sure what getNextPageParam depends on - but I assume that it might depend on the return type of queryFn. In the reported situation the queryFn is context-sensitive (it has unannotated parameters). If we introduce that extra change to the simplified repro above we end up with an issue too: https://www.typescriptlang.org/play?ts=5.4.4#code/C4TwDgpgBAsiDyAjAVhAxsAPAFQHxQF4oBvAWACgoowAnAewBMBXNCALigAoBDDgZ2A0AlgDsA5gEpC+bAG4KVNHRF8mAW3ZcG3YLyjYpBfADc6QhvPIBfSxSUrgUAGZ06hKDgA0uTnRQc4JFQMHFxDfDJKKHsBKFEwJkciP2QAOlpGFghOACIciUsqFNSY9Wz4xIKKGwoKFzpOSKoM5lYOHnCoAEYAJgBmTwVo5VUNdorgTonU4DoAMSEADwgGTglB6yryOtdGodKxrgmpkQTgGfmllbWN5vpWzQ7pbv6Nqy2gA

  3. ah got it. I remember there was an open TS issue but I couldn't find it. I think we're fine having this as a known limitation.

  4. TkDodo closed this

  5. TkDodo added labelsknown limitation

  6. TkDodo added labelsupstream

Sign in to join this conversation.