addedInput schema / properties / cache / additionalProperties / description
Added value: +"One normalized store entry: the raw field/value map Apollo keeps under a single cache key."
addedInput schema / properties / cache / description
Added value: +"The full serialized cache, exactly as returned by `cache.extract()`. Keys are cache IDs (e.g. \"ROOT_QUERY\", \"User:1\"); values are that entity's stored fields, which may contain `{ \"__ref\": \"<cache id>\" }` pointers to other entries in this same object."
addedInput schema / properties / dryRun / description
Added value: +"Validate `operations` and report what would happen without mutating the cache."
addedInput schema / properties / gc / description
Added value: +"Run `cache.gc()` once after all operations land, to collect anything the patches orphaned."
addedInput schema / properties / operations / description
Added value: +"One or more modify/evict operations to apply, in order."
changedInput schema / properties / operations / items / oneOf
Previous value: -[
- {
- "properties": {
- "broadcast": {
- "default": true,
- "type": "boolean"
- },
- "fields": {
- "additionalProperties": {
- "oneOf": [
- {
- "properties": {
- "action": {
- "const": "DELETE",
- "type": "string"
- }
- },
- "required": [
- "action"
- ],
- "type": "object"
- },
- {
- "properties": {
- "action": {
- "const": "INVALIDATE",
- "type": "string"
- }
- },
- "required": [
- "action"
- ],
- "type": "object"
- },
- {
- "properties": {
- "action": {
- "const": "SET",
- "type": "string"
- },
- "value": {}
- },
- "required": [
- "action",
- "value"
- ],
- "type": "object"
- },
- {
- "properties": {
- "action": {
- "const": "PRUNE_DANGLING_REFS",
- "type": "string"
- }
- },
- "required": [
- "action"
- ],
- "type": "object"
- }
- ]
- },
- "propertyNames": {
- "type": "string"
- },
- "type": "object"
- },
- "id": {
- "default": "ROOT_QUERY",
- "type": "string"
- },
- "optimistic": {
- "default": false,
- "type": "boolean"
- },
- "type": {
- "const": "modify",
- "type": "string"
- }
- },
- "required": [
- "type",
- "fields"
- ],
- "type": "object"
- },
- {
- "properties": {
- "args": {
- "additionalProperties": {},
- "propertyNames": {
- "type": "string"
- },
- "type": "object"
- },
- "broadcast": {
- "default": true,
- "type": "boolean"
- },
- "fieldName": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "type": {
- "const": "evict",
- "type": "string"
- }
- },
- "required": [
- "type",
- "id"
- ],
- "type": "object"
- }
-]New value: +[
+ {
+ "properties": {
+ "broadcast": {
+ "default": true,
+ "description": "Notify active queries/subscriptions of this change. Set false to patch silently.",
+ "type": "boolean"
+ },
+ "fields": {
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "description": "Remove this field from the entity entirely.",
+ "properties": {
+ "action": {
+ "const": "DELETE",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action"
+ ],
+ "type": "object"
+ },
+ {
+ "description": "Mark this field stale so Apollo refetches it, without removing or changing its value.",
+ "properties": {
+ "action": {
+ "const": "INVALIDATE",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action"
+ ],
+ "type": "object"
+ },
+ {
+ "description": "Overwrite this field with `value` (any JSON — a scalar, object, or `{ \"__ref\": \"<cache id>\" }`).",
+ "properties": {
+ "action": {
+ "const": "SET",
+ "type": "string"
+ },
+ "value": {}
+ },
+ "required": [
+ "action",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "description": "Drop any `__ref` pointer(s) this field holds that no longer resolve to an entity in the cache. Works on a single ref or a list of refs; refs that still resolve are left untouched.",
+ "properties": {
+ "action": {
+ "const": "PRUNE_DANGLING_REFS",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "description": "Map of field name -> FieldPatch describing how to change that one field.",
+ "propertyNames": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "id": {
+ "default": "ROOT_QUERY",
+ "description": "Cache key of the entity to modify, e.g. \"User:2\". Defaults to \"ROOT_QUERY\" if omitted.",
+ "type": "string"
+ },
+ "optimistic": {
+ "default": false,
+ "description": "Apply against the optimistic layer instead of the base cache. Mirrors `cache.modify`'s option.",
+ "type": "boolean"
+ },
+ "type": {
+ "const": "modify",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "fields"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "args": {
+ "additionalProperties": {},
+ "description": "Field arguments to match when evicting a specific parameterized field (used with `fieldName`).",
+ "propertyNames": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "broadcast": {
+ "default": true,
+ "description": "Notify active queries/subscriptions of this eviction. Set false to patch silently.",
+ "type": "boolean"
+ },
+ "fieldName": {
+ "description": "Evict only this one field instead of the whole entity at `id`.",
+ "type": "string"
+ },
+ "id": {
+ "description": "Cache key of the entity to evict, e.g. \"Post:5\".",
+ "type": "string"
+ },
+ "type": {
+ "const": "evict",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "id"
+ ],
+ "type": "object"
+ }
+]
addedOutput schema / properties / cache / additionalProperties / description
Added value: +"One normalized store entry: the raw field/value map Apollo keeps under a single cache key."
addedOutput schema / properties / cache / description
Added value: +"The store after the operations landed. Unchanged when `dryRun` is true."
addedOutput schema / properties / collected / description
Added value: +"Cache keys removed by the trailing `gc()`, when it ran."
addedOutput schema / properties / dryRun / description
Added value: +"Echoes the request's dryRun — true means the cache was not actually touched."
addedOutput schema / properties / results / description
Added value: +"One result per input operation, in the same order."
addedOutput schema / properties / results / items / properties / changed / description
Added value: +"Whether `cache.modify` / `cache.evict` actually changed anything."
addedOutput schema / properties / results / items / properties / error / description
Added value: +"Set when this one operation failed; the rest of the batch still ran."
addedOutput schema / properties / results / items / properties / operation / description
Added value: +"The operation this result is reporting on, echoed back."
changedOutput schema / properties / results / items / properties / operation / oneOf
Previous value: -[
- {
- "additionalProperties": false,
- "properties": {
- "broadcast": {
- "default": true,
- "type": "boolean"
- },
- "fields": {
- "additionalProperties": {
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "action": {
- "const": "DELETE",
- "type": "string"
- }
- },
- "required": [
- "action"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "action": {
- "const": "INVALIDATE",
- "type": "string"
- }
- },
- "required": [
- "action"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "action": {
- "const": "SET",
- "type": "string"
- },
- "value": {}
- },
- "required": [
- "action",
- "value"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "action": {
- "const": "PRUNE_DANGLING_REFS",
- "type": "string"
- }
- },
- "required": [
- "action"
- ],
- "type": "object"
- }
- ]
- },
- "propertyNames": {
- "type": "string"
- },
- "type": "object"
- },
- "id": {
- "default": "ROOT_QUERY",
- "type": "string"
- },
- "optimistic": {
- "default": false,
- "type": "boolean"
- },
- "type": {
- "const": "modify",
- "type": "string"
- }
- },
- "required": [
- "type",
- "id",
- "fields",
- "optimistic",
- "broadcast"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "args": {
- "additionalProperties": {},
- "propertyNames": {
- "type": "string"
- },
- "type": "object"
- },
- "broadcast": {
- "default": true,
- "type": "boolean"
- },
- "fieldName": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "type": {
- "const": "evict",
- "type": "string"
- }
- },
- "required": [
- "type",
- "id",
- "broadcast"
- ],
- "type": "object"
- }
-]New value: +[
+ {
+ "additionalProperties": false,
+ "properties": {
+ "broadcast": {
+ "default": true,
+ "description": "Notify active queries/subscriptions of this change. Set false to patch silently.",
+ "type": "boolean"
+ },
+ "fields": {
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "description": "Remove this field from the entity entirely.",
+ "properties": {
+ "action": {
+ "const": "DELETE",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "description": "Mark this field stale so Apollo refetches it, without removing or changing its value.",
+ "properties": {
+ "action": {
+ "const": "INVALIDATE",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "description": "Overwrite this field with `value` (any JSON — a scalar, object, or `{ \"__ref\": \"<cache id>\" }`).",
+ "properties": {
+ "action": {
+ "const": "SET",
+ "type": "string"
+ },
+ "value": {}
+ },
+ "required": [
+ "action",
+ "value"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "description": "Drop any `__ref` pointer(s) this field holds that no longer resolve to an entity in the cache. Works on a single ref or a list of refs; refs that still resolve are left untouched.",
+ "properties": {
+ "action": {
+ "const": "PRUNE_DANGLING_REFS",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "description": "Map of field name -> FieldPatch describing how to change that one field.",
+ "propertyNames": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "id": {
+ "default": "ROOT_QUERY",
+ "description": "Cache key of the entity to modify, e.g. \"User:2\". Defaults to \"ROOT_QUERY\" if omitted.",
+ "type": "string"
+ },
+ "optimistic": {
+ "default": false,
+ "description": "Apply against the optimistic layer instead of the base cache. Mirrors `cache.modify`'s option.",
+ "type": "boolean"
+ },
+ "type": {
+ "const": "modify",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "id",
+ "fields",
+ "optimistic",
+ "broadcast"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "args": {
+ "additionalProperties": {},
+ "description": "Field arguments to match when evicting a specific parameterized field (used with `fieldName`).",
+ "propertyNames": {
+ "type": "string"
+ },
+ "type": "object"
+ },
+ "broadcast": {
+ "default": true,
+ "description": "Notify active queries/subscriptions of this eviction. Set false to patch silently.",
+ "type": "boolean"
+ },
+ "fieldName": {
+ "description": "Evict only this one field instead of the whole entity at `id`.",
+ "type": "string"
+ },
+ "id": {
+ "description": "Cache key of the entity to evict, e.g. \"Post:5\".",
+ "type": "string"
+ },
+ "type": {
+ "const": "evict",
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "id",
+ "broadcast"
+ ],
+ "type": "object"
+ }
+]