MCPcopy
hub / github.com/TanStack/query / find

Method find

packages/query-core/src/queryCache.ts:183–191  ·  view source on GitHub ↗
(
    filters: WithRequired<QueryFilters, 'queryKey'>,
  )

Source from the content-addressed store, hash-verified

181 }
182
183 find<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData>(
184 filters: WithRequired<QueryFilters, 'queryKey'>,
185 ): Query<TQueryFnData, TError, TData> | undefined {
186 const defaultedFilters = { exact: true, ...filters }
187
188 return this.getAll().find((query) =>
189 matchQuery(defaultedFilters, query),
190 ) as Query<TQueryFnData, TError, TData> | undefined
191 }
192
193 findAll(filters: QueryFilters<any> = {}): Array<Query> {
194 const queries = this.getAll()

Callers 15

ExamplesFunction · 0.95
ExamplesFunction · 0.95
ExamplesFunction · 0.95
ExamplesFunction · 0.95
findImportSpecifiersFunction · 0.45
findAllMethodCallsFunction · 0.45
transformUsagesFunction · 0.45

Calls 2

getAllMethod · 0.95
matchQueryFunction · 0.90

Tested by

no test coverage detected