Skip to content

Commit

Permalink
docs: Clarify normalization comment re. query watcher (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari authored Nov 25, 2024
1 parent aa9316e commit 32307e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/fetching/queries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let watcher = apollo.watch(query: HeroNameQuery()) { result in
}
```

If your query shares response objects with other operations you will need to implement a [normalized cache](../caching/introduction) so that object data received in those other operations is written to the local cache and used to update your query watcher by invoking the result handler.
If your query shares response objects with other operations you will need to implement [cache key normalization](../caching/introduction#normalizing-objects-by-cache-key) so that object data received in those other operations is normalized in the local cache and used to update your query watcher by invoking the result handler.

When you call `ApolloClient.watch(query:)` a [`GraphQLQueryWatcher`](https://www.apollographql.com/docs/ios/docc/documentation/apollo/graphqlquerywatcher) is returned. Changes to the query's data will be watched until `cancel()` is called on the watcher.

Expand Down

0 comments on commit 32307e5

Please sign in to comment.