Skip to content

Commit aad10ca

Browse files
calvincestarigh-action-runner
authored andcommitted
docs: Adds note for automatically mutable fragments (#663)
1 parent 115a35b commit aad10ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/source/caching/cache-transactions.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ A [`LocalCacheMutation`](https://www.apollographql.com/docs/ios/docc/documentati
4848

4949
When a query or fragment with this directive is defined, the code generation engine will generate a mutable model that can be used with a [`ReadWriteTransaction`](https://www.apollographql.com/docs/ios/docc/documentation/apollo/apollostore/readwritetransaction) to write data to the cache.
5050

51+
> Any fragments referenced within a local cache mutation operation will also be generated as mutable. This will happen regardless of whether they are defined with the `@apollo_client_ios_localCacheMutation` directive or not. Code generation does this so that _all_ data related to the local cache mutation is mutable.
52+
5153
> Your query definitions can also define variables for these operations to mutate cache data for fields with input arguments. For more information see our [operation argument documentation](./../fetching/operation-arguments).
5254
5355
<CodeColumns>

0 commit comments

Comments
 (0)