Skip to content
Source
Sign inSign up
TanStack/query

No in-editor docs on `gcTime` #6323

Send to my agent
Closedc-ehrlich(GitHub profile, opens in a new tab) opened this issue 3 comments

Describe the bug

gcTime is missing in-editor docs. Seems like an important one to have them as it's a (sort of) new option, and people are often confused about the difference between staleTime and cache/gcTime.

staleTime: CleanShot 2023-11-07 at 10 36 27

gcTime: CleanShot 2023-11-07 at 10 36 36

Your minimal, reproducible example

https://github.com/c-ehrlich/rq-example

Steps to reproduce

in the example repo:

  • pnpm i
  • open App.tsx in editor
  • in the options for query, staleTime has in-editor docs but gcTime does not

or should be the same in any other repo that uses v5

Expected behavior

I expected in-editor docs for gcTime

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

MacOS, VSCode 1.84.0

Tanstack Query adapter

react-query

TanStack Query version

5.7.2

TypeScript version

5.2.2

Additional context

No response

  1. TkDodo added labelsdocumentation

  2. staleTime docs are here, on QueryObserverOptions:

    https://github.com/TanStack/query/blob/8dfc52ad45a850711f6a48511062f0986797ce2d/packages/query-core/src/types.ts#L226-L230

    I think this is the only place where we have js docs. we should probably add them on QueryOptions, too:

    https://github.com/TanStack/query/blob/8dfc52ad45a850711f6a48511062f0986797ce2d/packages/query-core/src/types.ts#L141-L154

    Open for contributions :)

  3. TkDodo added labelsgood first issue

  4. Hi @TkDodo I would like to work on this issue

  5. TkDodo assignedDhoni77

  6. it's yours 🚀

    you can find the descriptions of each prop in the api reference:

    https://tanstack.com/query/v5/docs/react/reference/useQuery

  7. TkDodo closed this

Sign in to join this conversation.