Skip to content

Commit 6a9dac4

Browse files
committed
Add invalidationBehavior docblock to API ref
1 parent 69d1e62 commit 6a9dac4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/rtk-query/api/createApi.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const { useGetPokemonByNameQuery } = pokemonApi
5454
// highlight-end
5555
```
5656

57-
## Parameters
57+
## `createApi` Parameters
5858

5959
`createApi` accepts a single configuration object parameter with the following options:
6060

@@ -357,6 +357,10 @@ See also [Server Side Rendering](../usage/server-side-rendering.mdx) and
357357

358358
By default, this function will take the query arguments, sort object keys where applicable, stringify the result, and concatenate it with the endpoint name. This creates a cache key based on the combination of arguments + endpoint name (ignoring object key order), such that calling any given endpoint with the same arguments will result in the same cache key.
359359

360+
### `invalidationBehavior`
361+
362+
[summary](docblock://query/createApi.ts?token=CreateApiOptions.invalidationBehavior)
363+
360364
### `keepUnusedDataFor`
361365

362366
[summary](docblock://query/createApi.ts?token=CreateApiOptions.keepUnusedDataFor)
@@ -389,7 +393,7 @@ You can set this globally in `createApi`, but you can also override the default
389393
If you specify `track: false` when manually dispatching queries, RTK Query will not be able to automatically refetch for you.
390394
:::
391395

392-
## Anatomy of an endpoint
396+
## Endpoint Definition Parameters
393397

394398
### `query`
395399

0 commit comments

Comments
 (0)