Skip to content

Commit 99fa7a0

Browse files
authored
docs: fixes markdown links (TanStack#796)
* docs: fixes markdown links Dependent Queries & Query Keys are pointing to api.md headers when they're documented in /guides/queries/(...) * docs: fixes links with mk extension
1 parent 91c10d8 commit 99fa7a0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/src/pages/docs/api.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const queryInfo = useQuery({
5656
- **Required**
5757
- The query key to use for this query.
5858
- If a string is passed, it will be used as the query key.
59-
- If a `[String, ...any]` array is passed, each item will be serialized into a stable query key. See [Query Keys](#query-keys) for more information.
59+
- If a `[String, ...any]` array is passed, each item will be serialized into a stable query key. See [Query Keys](./guides/queries#query-keys) for more information.
6060
- The query will automatically update when this key changes (as long as `enabled` is not set to `false`).
6161
- `queryFn: Function(variables) => Promise(data/error)`
6262
- **Required, but only if no default query function has been defined**
@@ -66,7 +66,7 @@ const queryInfo = useQuery({
6666
- Must return a promise that will either resolves data or throws an error.
6767
- `enabled: Boolean | unknown`
6868
- Set this to `false` to disable this query from automatically running.
69-
- Actually it can be anything that will pass a boolean condition. See [Dependent Queries](#dependent-queries) for more information.
69+
- Actually it can be anything that will pass a boolean condition. See [Dependent Queries](./guides/queries#dependent-queries) for more information.
7070
- `retry: Boolean | Int | Function(failureCount, error) => shouldRetry | Boolean`
7171
- If `false`, failed queries will not retry by default.
7272
- If `true`, failed queries will retry infinitely.
@@ -378,7 +378,7 @@ const data = queryCache.getQueryData(queryKey)
378378
**Options**
379379
380380
- `queryKey: QueryKey`
381-
- See [Query Keys](#query-keys) for more information on how to construct and use a query key
381+
- See [Query Keys](./guides/queries#query-keys) for more information on how to construct and use a query key
382382
383383
**Returns**
384384
@@ -400,7 +400,7 @@ queryCache.setQueryData(queryKey, updater, config)
400400
**Options**
401401
402402
- `queryKey: QueryKey`
403-
- See [Query Keys](#query-keys) for more information on how to construct and use a query key
403+
- See [Query Keys](./guides/queries#query-keys) for more information on how to construct and use a query key
404404
- `updater: Any | Function(oldData) => newData`
405405
- If non-function is passed, the data will be updated to this value
406406
- If a function is passed, it will receive the old data value and be expected to return a new one.
@@ -443,7 +443,7 @@ const queries = queryCache.invalidateQueries(inclusiveQueryKeyOrPredicateFn, {
443443
444444
- `queryKeyOrPredicateFn` can either be a [Query Key](#query-keys) or a `function`
445445
- `queryKey: QueryKey`
446-
- If a query key is passed, queries will be filtered to those where this query key is included in the existing query's query key. This means that if you passed a query key of `'todos'`, it would match queries with the `todos`, `['todos']`, and `['todos', 5]`. See [Query Keys](#query-keys) for more information.
446+
- If a query key is passed, queries will be filtered to those where this query key is included in the existing query's query key. This means that if you passed a query key of `'todos'`, it would match queries with the `todos`, `['todos']`, and `['todos', 5]`. See [Query Keys](./guides/queries#query-keys) for more information.
447447
- `Function(query) => Boolean`
448448
- This predicate function will be called for every single query in the cache and be expected to return truthy for queries that are `found`.
449449
- The `exact` option has no effect with using a function
@@ -480,7 +480,7 @@ const queries = queryCache.cancelQueries(queryKeyOrPredicateFn, {
480480
481481
- `queryKeyOrPredicateFn` can either be a [Query Key](#query-keys) or a `function`
482482
- `queryKey`
483-
- If a query key is passed, queries will be filtered to those where this query key is included in the existing query's query key. This means that if you passed a query key of `'todos'`, it would match queries with the `todos`, `['todos']`, and `['todos', 5]`. See [Query Keys](#query-keys) for more information.
483+
- If a query key is passed, queries will be filtered to those where this query key is included in the existing query's query key. This means that if you passed a query key of `'todos'`, it would match queries with the `todos`, `['todos']`, and `['todos', 5]`. See [Query Keys](./guides/queries#query-keys) for more information.
484484
- `Function(query) => Boolean`
485485
- This predicate function will be called for every single query in the cache and be expected to return truthy for queries that are `found`.
486486
- The `exact` option has no effect with using a function
@@ -507,7 +507,7 @@ const queries = queryCache.removeQueries(queryKeyOrPredicateFn, {
507507
508508
- `queryKeyOrPredicateFn` can either be a [Query Key](#query-keys) or a `function`
509509
- `queryKey`
510-
- If a query key is passed, queries will be filtered to those where this query key is included in the existing query's query key. This means that if you passed a query key of `'todos'`, it would match queries with the `todos`, `['todos']`, and `['todos', 5]`. See [Query Keys](#query-keys) for more information.
510+
- If a query key is passed, queries will be filtered to those where this query key is included in the existing query's query key. This means that if you passed a query key of `'todos'`, it would match queries with the `todos`, `['todos']`, and `['todos', 5]`. See [Query Keys](./guides/queries#query-keys) for more information.
511511
- `Function(query) => Boolean`
512512
- This predicate function will be called for every single query in the cache and be expected to return truthy for queries that are `found`.
513513
- The `exact` option has no effect with using a function
@@ -533,7 +533,7 @@ const query = queryCache.getQuery(queryKey)
533533
**Options**
534534
535535
- `queryKey: QueryKey`
536-
- See [Query Keys](#query-keys) for more information on how to construct and use a query key
536+
- See [Query Keys](./guides/queries#query-keys) for more information on how to construct and use a query key
537537
538538
**Returns**
539539
@@ -555,7 +555,7 @@ const queries = queryCache.getQueries(queryKey)
555555
**Options**
556556
557557
- `queryKey: QueryKey`
558-
- See [Query Keys](#query-keys) for more information on how to construct and use a query key
558+
- See [Query Keys](./guides/queries#query-keys) for more information on how to construct and use a query key
559559
560560
**Returns**
561561

0 commit comments

Comments
 (0)