You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`endpointName`: a string matching an existing endpoint name
166
-
-`arg`: a cache key, used to determine which cached dataset needs to be updated
167
-
-`patches`: an array of patches (or inverse patches) to apply to cached state. These would typically be obtained from the result of dispatching [`updateQueryData`](#updatequerydata)
168
-
-`updateProvided`: a boolean indicating whether the endpoint's provided tags should be re-calculated based on the updated cache. Defaults to `false`.
166
+
#### Parameters
167
+
168
+
-`endpointName`: a string matching an existing endpoint name
169
+
-`arg`: a cache key, used to determine which cached dataset needs to be updated
170
+
-`patches`: an array of patches (or inverse patches) to apply to cached state. These would typically be obtained from the result of dispatching [`updateQueryData`](#updatequerydata)
171
+
-`updateProvided`: a boolean indicating whether the endpoint's provided tags should be re-calculated based on the updated cache. Defaults to `false`.
-`entries`: an array of objects that contain the data needed to upsert individual cache entries:
225
-
-`endpointName`: the name of the endpoint, such as `"getPokemon"`
226
-
-`arg`: the full query key argument needed to identify this cache entry, such as `"pikachu"` (same as you would pass to a `useQuery` hook or `api.endpoints.someEndpoint.select()`)
227
-
-`value`: the data to be upserted into this cache entry, exactly as formatted.
226
+
#### Parameters
227
+
228
+
-`entries`: an array of objects that contain the data needed to upsert individual cache entries:
229
+
-`endpointName`: the name of the endpoint, such as `"getPokemon"`
230
+
-`arg`: the full query key argument needed to identify this cache entry, such as `"pikachu"` (same as you would pass to a `useQuery` hook or `api.endpoints.someEndpoint.select()`)
231
+
-`value`: the data to be upserted into this cache entry, exactly as formatted.
228
232
229
233
#### Description
230
234
@@ -259,7 +263,7 @@ const api = createApi({
259
263
260
264
// Pre-fill the individual post entries with the results
-`endpointName`: a string matching an existing endpoint name
296
-
-`args`: a cache key, used to determine which cached dataset needs to be updated
297
-
-`options`: options to determine whether the request should be sent for a given situation:
298
-
-`ifOlderThan`: if specified, only runs the query if the difference between `new Date()` and the last`fulfilledTimeStamp` is greater than the given value (in seconds)
299
-
-`force`: if `true`, it will ignore the `ifOlderThan` value if it is set and the query will be run even if it exists in the cache.
299
+
-`endpointName`: a string matching an existing endpoint name
300
+
-`args`: a cache key, used to determine which cached dataset needs to be updated
301
+
-`options`: options to determine whether the request should be sent for a given situation:
302
+
-`ifOlderThan`: if specified, only runs the query if the difference between `new Date()` and the last`fulfilledTimeStamp` is greater than the given value (in seconds)
303
+
-`force`: if `true`, it will ignore the `ifOlderThan` value if it is set and the query will be run even if it exists in the cache.
300
304
301
305
#### Description
302
306
@@ -327,12 +331,13 @@ function selectInvalidatedBy(
327
331
}>
328
332
```
329
333
330
-
-**Parameters**
331
-
-`state`: therootstate
332
-
-`tags`: areadonlyarrayofinvalidatedtags, wheretheprovided`TagDescription`isoneofthestringsprovidedtothe [`tagTypes`](../createApi.mdx#tagtypes) propertyoftheapi. e.g.
333
-
-`[TagType]`
334
-
-`[{ type: TagType }]`
335
-
-`[{ type: TagType, id: number | string }]`
334
+
#### Parameters
335
+
336
+
-`state`: therootstate
337
+
-`tags`: areadonlyarrayofinvalidatedtags, wheretheprovided`TagDescription`isoneofthestringsprovidedtothe [`tagTypes`](../createApi.mdx#tagtypes) propertyoftheapi. e.g.
338
+
-`[TagType]`
339
+
-`[{ type: TagType }]`
340
+
-`[{ type: TagType, id: number | string }]`
336
341
337
342
#### Description
338
343
@@ -373,11 +378,12 @@ const invalidateTags = (
373
378
})
374
379
```
375
380
376
-
-**Parameters**
377
-
-`tags`: anarrayoftagstobeinvalidated, wheretheprovided`TagType`isoneofthestringsprovidedtothe [`tagTypes`](../createApi.mdx#tagtypes) propertyoftheapi. e.g.
378
-
-`[TagType]`
379
-
-`[{ type: TagType }]`
380
-
-`[{ type: TagType, id: number | string }]`
381
+
#### Parameters
382
+
383
+
-`tags`: anarrayoftagstobeinvalidated, wheretheprovided`TagType`isoneofthestringsprovidedtothe [`tagTypes`](../createApi.mdx#tagtypes) propertyoftheapi. e.g.
384
+
-`[TagType]`
385
+
-`[{ type: TagType }]`
386
+
-`[{ type: TagType, id: number | string }]`
381
387
382
388
#### Description
383
389
@@ -411,9 +417,10 @@ function selectCachedArgsForQuery(
0 commit comments