query icon indicating copy to clipboard operation
query copied to clipboard

No information about matchQuery in the docs

Open swingthrough opened this issue 8 months ago • 2 comments

Describe the bug

I saw this tweet: https://x.com/TkDodo/status/1744604450566680864

queryClient.invalidateQueries({ predicate: query => matchQuery(['comments']) || matchQuery(['likes']) })

matchQuery can be imported from RQ

So I tried searching matchQuery in the docs but nothing was found. Shouldn't this be mentioned somewhere?

Edit: I also found usage of matchQuery in this article: https://tkdodo.eu/blog/automatic-query-invalidation-after-mutations#use-the-meta-option

but the usage is a little bit different:

matchQuery({ queryKey }, query)

Your minimal, reproducible example

...

Steps to reproduce

  1. Go to the docs
  2. Search for matchQuery
  3. No results are found

Expected behavior

I'd expect matchQuery to be documented.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

docs

Tanstack Query adapter

None

TanStack Query version

latest

TypeScript version

No response

Additional context

No response

swingthrough avatar Jun 24 '24 11:06 swingthrough