···385385a separate virtual operation in our resolvers. When we call `cache.readQuery` with a query and
386386variables we can execute an entirely new GraphQL query against our cached data:
387387388388-```js
389389-cache.readQuery({ query: Todos, variables: { from: 0, limit: 10 } })`
388388+```js
389389+import { gql } from '@urql/core';
390390+import { cacheExchange } from '@urql/exchange-graphcache';
391391+392392+const cache = cacheExchange({
393393+ updates: {
394394+ Mutation: {
395395+ addTodo: (result, args, cache) => {
396396+ const data = cache.readQuery({ query: Todos, variables: { from: 0, limit: 10 } });
397397+ }
398398+ }
399399+ }
400400+})
390401```
391402392403This way we'll get the stored data for the `TodosQuery` for the given `variables`.
···400411401412```js
402413import { gql } from '@urql/core';
414414+import { cacheExchange } from '@urql/exchange-graphcache';
403415404404-const data = cache.readFragment(
405405- gql`
406406- fragment _ on Todo {
407407- id
408408- text
416416+const cache = cacheExchange({
417417+ resolvers: {
418418+ Query: {
419419+ Todo: (parent, args, cache) => {
420420+ return cache.readFragment(
421421+ gql`
422422+ fragment _ on Todo {
423423+ id
424424+ text
425425+ }
426426+ `,
427427+ { id: 1 }
428428+ );
429429+ }
409430 }
410410- `,
411411- { id: 1 }
412412-);
431431+ }
432432+})
413433```
414434415435> **Note:** In the above example, we've used
···420440case `{ id: 1 }`.
421441422442[Read more about `cache.readFragment` in the Graphcache API docs.](../api/graphcache.md#readfragment)
443443+444444+### Cache methods outside of `resolvers`
445445+446446+The cache read methods are not possible outside of GraphQL operations. This means these methods will
447447+be limited to the different `Graphcache` configuration methods.
423448424449## Pagination
425450