···216216});
217217```
218218219219+Let's combine the above example with invalidating fields, imagine the scenario where we add a todo but
220220+rather than manually pushing it on all the lists we just want to refetch the lists.
221221+222222+```js
223223+const cache = cacheExchange({
224224+ updates: {
225225+ Mutation: {
226226+ addTodo: (result, args, cache, info) => {
227227+ const todoQueries = cache.inspectFields('Query').filter(x => x.fieldName === 'todos');
228228+229229+ todosQueries.forEach(({ fieldName, arguments: variables }) => {
230230+ cache.invalidate('Query', fieldName, variables);
231231+ });
232232+ },
233233+ },
234234+ },
235235+});
236236+```
237237+238238+Now when we come onto a list we'll know that this list needs to be refetched.
239239+219240## Optimistic updates
220241221242If we know what result a mutation may return, why wait for the GraphQL API to fulfill our mutations?