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
Copy file name to clipboardExpand all lines: docs/rest/api/Invalidate.md
+77-2Lines changed: 77 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,22 @@ import EndpointPlayground from '@site/src/components/HTTP/EndpointPlayground';
12
12
Describes entities to be marked as [INVALID](/docs/concepts/expiry-policy#invalid). This removes items from a
13
13
collection, or [forces suspense](/docs/concepts/expiry-policy#invalidate-entity) for endpoints where the entity is required.
14
14
15
-
Constructor:
15
+
## Constructor
16
16
17
-
-`entity` which entity to invalidate. The input is used to compute the pk() for lookup.
17
+
```typescript
18
+
newschema.Invalidate(entity)
19
+
newschema.Invalidate(union)
20
+
newschema.Invalidate(entityMap, schemaAttribute)
21
+
```
22
+
23
+
-`entity`: A singular [Entity](./Entity.md) to invalidate.
24
+
-`union`: A [Union](./Union.md) schema for polymorphic invalidation.
25
+
-`entityMap`: A mapping of schema keys to [Entities](./Entity.md).
26
+
-`schemaAttribute`: _optional_ (required if `entityMap` is used) The attribute on each entity found that defines what schema, per the entityMap, to use when normalizing.
27
+
Can be a string or a function. If given a function, accepts the following arguments:
28
+
-`value`: The input value of the entity.
29
+
-`parent`: The parent object of the input array.
30
+
-`key`: The key at which the input array appears on the parent object.
0 commit comments