Skip to content

Commit

Permalink
Update caching.mdx (apollographql#2042)
Browse files Browse the repository at this point in the history
fixed typo
  • Loading branch information
bogdanbeczkowski authored and TizianoCoroneo committed Feb 9, 2022
1 parent 69808f1 commit 67fb7e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Manual Scenario A
Manual Scenario B

1. You fire off a mutation which creates a new object.
2. You may then want to update the cache for a List that should contain this new object. This is a bit fiddly at the moment, as `Droid` for `CreateDroidsMutation` is strongly typed: `CreateDroidsMutation.Droid`. When inserting this object into the cache for `ListDroidsQuery` you need to init a `ListDroidsQuery.Droid` object from a `CreateDroidsMutation.Droid` or the types won't match. Your alternative to this is to manually refectch queries on a mutation which will trigger any watchers to update.
2. You may then want to update the cache for a List that should contain this new object. This is a bit fiddly at the moment, as `Droid` for `CreateDroidsMutation` is strongly typed: `CreateDroidsMutation.Droid`. When inserting this object into the cache for `ListDroidsQuery` you need to init a `ListDroidsQuery.Droid` object from a `CreateDroidsMutation.Droid` or the types won't match. Your alternative to this is to manually refetch queries on a mutation which will trigger any watchers to update.

Where you may not need to manually update the cache:

Expand Down

0 comments on commit 67fb7e1

Please sign in to comment.