Repository: FormidableLabs/urql
Pull request #623 (2020-03-16 11:13:24)

(integrations) - upgrade dependencies
<!--
  Thanks for opening a pull request! We appreciate your dedication and help!
  Before submitting your pull request, please make sure to read our CONTRIBUTING guide.

  The best contribution is always a PR! However, if you're starting to work on a large
  change, it's best to make sure to open an issue first.

  If this PR is already related to an issue, please reference it like so:
  Resolves #123
-->

## Summary

We've removed the `linked` option from `changeset` since this didn't seem to correctly bump when we released. This bumps `@urql/core` and some other devDeps.

## Set of changes

- Bump `@urql/core` to `^1.10.0` for our integrations


changeset-bot[bot]: ###  🦋  Changeset is good to go

Latest commit: a8baec819aeb79430b2ec47ddbee727366c5e343

**We got this.**

<details><summary>This PR includes changesets to release 3 packages</summary>

  | Name         | Type  |
| ------------ | ----- |
| @urql/preact | Patch |
| urql         | Patch |
| @urql/svelte | Patch |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/FormidableLabs/urql/new/upgrade-packages?filename=.changeset/stale-walls-compare.md&value=---%0A%22next-urql%22%3A%20patch%0A%22%40urql%2Fpreact%22%3A%20patch%0A%22urql%22%3A%20patch%0A%22%40urql%2Fsvelte%22%3A%20patch%0A%22%40urql%2Fexchange-retry%22%3A%20patch%0A%22%40urql%2Fexchange-suspense%22%3A%20patch%0A---%0A%0A(integrations)%20-%20upgrade%20dependencies%0A)



Patch:
diff --git a/.changeset/fresh-cars-sip.md b/.changeset/fresh-cars-sip.md
new file mode 100644
index 00000000..825d372a
--- /dev/null
+++ b/.changeset/fresh-cars-sip.md
@@ -0,0 +1,5 @@
+---
+'@urql/exchange-graphcache': patch
+---
+
+Improve Store constructor to accept an options object instead of separate arguments, identical to the cacheExchange options. (This is a patch, not a minor, since we consider Store part of the private API)
diff --git a/.changeset/poor-bats-approve.md b/.changeset/poor-bats-approve.md
new file mode 100644
index 00000000..cdb27b62
--- /dev/null
+++ b/.changeset/poor-bats-approve.md
@@ -0,0 +1,7 @@
+---
+'@urql/preact': patch
+'urql': patch
+'@urql/svelte': patch
+---
+
+Bumps the `@urql/core` dependency minor version to ^1.10.1 for React, Preact and Svelte.
diff --git a/exchanges/graphcache/src/cacheExchange.ts b/exchanges/graphcache/src/cacheExchange.ts
index 0d66a67e..50c9b21b 100644
--- a/exchanges/graphcache/src/cacheExchange.ts
+++ b/exchanges/graphcache/src/cacheExchange.ts
@@ -86,18 +86,10 @@ export const cacheExchange = (opts?: CacheExchangeOpts): Exchange => ({
   forward,
   client,
 }) => {
-  if (!opts) opts = {};
-
-  const store = new Store(
-    opts.schema,
-    opts.resolvers,
-    opts.updates,
-    opts.optimistic,
-    opts.keys
-  );
+  const store = new Store(opts);
 
   let hydration: void | Promise<void>;
-  if (opts.storage) {
+  if (opts && opts.storage) {
     hydration = opts.storage.read().then(entries => {
       hydrateData(store.data, opts!.storage!, entries);
     });
diff --git a/exchanges/graphcache/src/store/store.ts b/exchanges/graphcache/src/store/store.ts
index f335b6b8..4e9ed362 100644
--- a/exchanges/graphcache/src/store/store.ts
+++ b/exchanges/graphcache/src/store/store.ts
@@ -30,6 +30,14 @@ import * as InMemoryData from './data';
 
 type RootField = 'query' | 'mutation' | 'subscription';
 
+export interface StoreOpts {
+  updates?: Partial<UpdatesConfig>;
+  resolvers?: ResolverConfig;
+  optimistic?: OptimisticMutationConfig;
+  keys?: KeyingConfig;
+  schema?: IntrospectionQuery;
+}
+
 export class Store implements Cache {
   data: InMemoryData.InMemoryData;
 
@@ -42,27 +50,23 @@ export class Store implements Cache {
   rootFields: { query: string; mutation: string; subscription: string };
   rootNames: { [name: string]: RootField };
 
-  constructor(
-    rawSchema?: IntrospectionQuery,
-    resolvers?: ResolverConfig,
-    updates?: Partial<UpdatesConfig>,
-    optimisticMutations?: OptimisticMutationConfig,
-    keys?: KeyingConfig
-  ) {
-    this.resolvers = resolvers || {};
-    this.optimisticMutations = optimisticMutations || {};
-    this.keys = keys || {};
+  constructor(opts?: StoreOpts) {
+    if (!opts) opts = {};
+
+    this.resolvers = opts.resolvers || {};
+    this.optimisticMutations = opts.optimistic || {};
+    this.keys = opts.keys || {};
 
     this.updates = {
-      Mutation: (updates && updates.Mutation) || {},
-      Subscription: (updates && updates.Subscription) || {},
+      Mutation: (opts.updates && opts.updates.Mutation) || {},
+      Subscription: (opts.updates && opts.updates.Subscription) || {},
     } as UpdatesConfig;
 
     let queryName = 'Query';
     let mutationName = 'Mutation';
     let subscriptionName = 'Subscription';
-    if (rawSchema) {
-      const schema = (this.schema = buildClientSchema(rawSchema));
+    if (opts.schema) {
+      const schema = (this.schema = buildClientSchema(opts.schema));
       const queryType = schema.getQueryType();
       const mutationType = schema.getMutationType();
       const subscriptionType = schema.getSubscriptionType();
diff --git a/exchanges/retry/package.json b/exchanges/retry/package.json
index 276ab8f5..ce412826 100644
--- a/exchanges/retry/package.json
+++ b/exchanges/retry/package.json
@@ -44,8 +44,8 @@
   "devDependencies": {
     "@types/react": "^16.9.19",
     "graphql": "^14.6.0",
-    "react": "^16.12.0",
-    "react-dom": "^16.12.0"
+    "react": "^16.13.0",
+    "react-dom": "^16.13.0"
   },
   "peerDependencies": {
     "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0",
diff --git a/exchanges/suspense/package.json b/exchanges/suspense/package.json
index fa695fa6..7b775273 100644
--- a/exchanges/suspense/package.json
+++ b/exchanges/suspense/package.json
@@ -44,8 +44,8 @@
   "devDependencies": {
     "@types/react": "^16.9.19",
     "graphql": "^14.6.0",
-    "react": "^16.12.0",
-    "react-dom": "^16.12.0"
+    "react": "^16.13.0",
+    "react-dom": "^16.13.0"
   },
   "peerDependencies": {
     "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0",
diff --git a/package.json b/package.json
index 1ff9b170..80c37d39 100644
--- a/package.json
+++ b/package.json
@@ -76,12 +76,12 @@
     "lint-staged": "^10.0.8",
     "npm-run-all": "^4.1.5",
     "prettier": "^1.19.1",
-    "react": "^16.12.0",
-    "react-dom": "^16.12.0",
+    "react": "^16.13.0",
+    "react-dom": "^16.13.0",
     "react-is": "^16.12.0",
     "react-test-renderer": "^16.12.0",
     "rimraf": "^3.0.2",
-    "rollup": "^2.0.5",
+    "rollup": "^2.0.6",
     "rollup-plugin-babel": "^4.4.0",
     "rollup-plugin-generate-package-json": "^3.2.0",
     "rollup-plugin-terser": "^5.3.0",
diff --git a/packages/next-urql/package.json b/packages/next-urql/package.json
index 6535ae49..e1464304 100644
--- a/packages/next-urql/package.json
+++ b/packages/next-urql/package.json
@@ -45,8 +45,8 @@
     "graphql-tag": "^2.10.3",
     "isomorphic-unfetch": "^3.0.0",
     "next": "^9.2.1",
-    "react": "^16.12.0",
-    "react-dom": "^16.12.0",
+    "react": "^16.13.0",
+    "react-dom": "^16.13.0",
     "react-is": "^16.12.0"
   },
   "dependencies": {
diff --git a/packages/preact-urql/package.json b/packages/preact-urql/package.json
index f0676eaf..2a766b13 100644
--- a/packages/preact-urql/package.json
+++ b/packages/preact-urql/package.json
@@ -45,14 +45,14 @@
     "@testing-library/preact": "^1.0.2",
     "graphql": "^14.5.8",
     "graphql-tag": "^2.10.1",
-    "preact": "^10.3.1"
+    "preact": "^10.3.4"
   },
   "peerDependencies": {
     "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0",
     "preact": ">= 10.0.0"
   },
   "dependencies": {
-    "@urql/core": ">=1.9.0",
+    "@urql/core": "^1.10.1",
     "wonka": "^4.0.6"
   },
   "publishConfig": {
diff --git a/packages/react-urql/package.json b/packages/react-urql/package.json
index a21c45c3..f50b1b1a 100644
--- a/packages/react-urql/package.json
+++ b/packages/react-urql/package.json
@@ -50,8 +50,8 @@
     "@types/use-subscription": "^1.0.0",
     "graphql": "^14.6.0",
     "graphql-tag": "^2.10.1",
-    "react": "^16.12.0",
-    "react-dom": "^16.12.0",
+    "react": "^16.13.0",
+    "react-dom": "^16.13.0",
     "react-is": "^16.12.0",
     "react-ssr-prepass": "^1.1.2",
     "react-test-renderer": "^16.12.0"
@@ -61,7 +61,7 @@
     "react": ">= 16.8.0"
   },
   "dependencies": {
-    "@urql/core": "^1.9.0",
+    "@urql/core": "^1.10.1",
     "use-subscription": "^1.4.0",
     "wonka": "^4.0.7"
   }
diff --git a/packages/svelte-urql/package.json b/packages/svelte-urql/package.json
index 9fe84e05..cc681a61 100644
--- a/packages/svelte-urql/package.json
+++ b/packages/svelte-urql/package.json
@@ -46,12 +46,12 @@
     "svelte": "^3.0.0"
   },
   "dependencies": {
-    "@urql/core": ">= 1.8.0",
+    "@urql/core": "^1.10.1",
     "wonka": "^4.0.7"
   },
   "devDependencies": {
     "graphql": "^14.5.8",
-    "svelte": "^3.16.7"
+    "svelte": "^3.20.0"
   },
   "publishConfig": {
     "access": "public"
diff --git a/yarn.lock b/yarn.lock
index 12fa5530..25ded1f3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10121,10 +10121,10 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.1
     source-map "^0.6.1"
     supports-color "^6.1.0"
 
-preact@^10.3.1, preact@^10.3.3:
-  version "10.3.3"
-  resolved "https://registry.yarnpkg.com/preact/-/preact-10.3.3.tgz#31a949cdc89dd1cf72bc2b94f80ad55d1ac8c7e6"
-  integrity sha512-8EWUuHuLhX48uK0acnnXwBL/ZyrgeadnyhxG6hFI85BhwmquyGwWzfj2SylCNdEyltkdgbY3FZzQOM2mG1leAg==
+preact@^10.3.3, preact@^10.3.4:
+  version "10.3.4"
+  resolved "https://registry.yarnpkg.com/preact/-/preact-10.3.4.tgz#e1542a4d3eba3e7a37f312a2c331231b97052024"
+  integrity sha512-wMgzs/RGYf0I1PZf8ZFJdyU/3kCcwepJyVYe+N9FGajyQWarMoPrPfrQajcG0psPj6ySYv2cSuLYFCihvV/Qrw==
 
 prelude-ls@~1.1.2:
   version "1.1.2"
@@ -10453,14 +10453,15 @@ react-document-meta@^2.0.3:
     prop-types "^15.5.8"
     react-side-effect "^1.1.0"
 
-react-dom@^16.12.0, react-dom@^16.9.0:
-  version "16.12.0"
-  resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11"
+react-dom@^16.12.0, react-dom@^16.13.0, react-dom@^16.9.0:
+  version "16.13.0"
+  resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.0.tgz#cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866"
+  integrity sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==
   dependencies:
     loose-envify "^1.1.0"
     object-assign "^4.1.1"
     prop-types "^15.6.2"
-    scheduler "^0.18.0"
+    scheduler "^0.19.0"
 
 react-error-overlay@5.1.6:
   version "5.1.6"
@@ -10707,9 +10708,10 @@ react-universal-component@^4.0.0:
     prop-types "^15.7.2"
     react-hot-loader "^4.3.6"
 
-react@^16.12.0, react@^16.9.0:
-  version "16.12.0"
-  resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83"
+react@^16.13.0, react@^16.9.0:
+  version "16.13.0"
+  resolved "https://registry.yarnpkg.com/react/-/react-16.13.0.tgz#d046eabcdf64e457bbeed1e792e235e1b9934cf7"
+  integrity sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==
   dependencies:
     loose-envify "^1.1.0"
     object-assign "^4.1.1"
@@ -11294,10 +11296,10 @@ rollup-pluginutils@2.8.2, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
   dependencies:
     estree-walker "^0.6.1"
 
-rollup@^2.0.5:
-  version "2.0.5"
-  resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.0.5.tgz#55b8c0d62360a095e322ac7425b13ac5a97edcb4"
-  integrity sha512-bECGz+RYpw3NYCvLnABu3REUROYbnZsfQZA37ekm/KlgKt/fyxBNN4waBnlLwzx4r6jNBs56SbTn7PEgJjw3fQ==
+rollup@^2.0.6:
+  version "2.0.6"
+  resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.0.6.tgz#865d6bb15a28cff3429ea1dc57236013661cb9de"
+  integrity sha512-P42IlI6a/bxh52ed8hEXXe44LcHfep2f26OZybMJPN1TTQftibvQEl3CWeOmJrzqGbFxOA000QXDWO9WJaOQpA==
   optionalDependencies:
     fsevents "~2.1.2"
 
@@ -11389,13 +11391,6 @@ saxes@^3.1.9:
   dependencies:
     xmlchars "^2.1.1"
 
-scheduler@^0.18.0:
-  version "0.18.0"
-  resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4"
-  dependencies:
-    loose-envify "^1.1.0"
-    object-assign "^4.1.1"
-
 scheduler@^0.19.0:
   version "0.19.0"
   resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.0.tgz#a715d56302de403df742f4a9be11975b32f5698d"
@@ -12305,9 +12300,10 @@ surge@^0.21.3:
     tarr "1.1.0"
     url-parse-as-address "1.0.0"
 
-svelte@^3.16.7:
-  version "3.18.1"
-  resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.18.1.tgz#db0f82cc46394ca8c9a9d183995e1ebfeea3bdd0"
+svelte@^3.20.0:
+  version "3.20.0"
+  resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.20.0.tgz#15a0c118712720abe5396415a1a6e4ecefadb627"
+  integrity sha512-RMJeM/1603O9nJKb7KL1BCGFJ5cbOKTvjPjkkhRwu+qbub70hp/Q3vn7gF8aPlna5zG1IhiYuAfQw95yZGA8cA==
 
 svgo@^1.0.0:
   version "1.3.2"


Test patch:
diff --git a/exchanges/graphcache/src/extras/relayPagination.test.ts b/exchanges/graphcache/src/extras/relayPagination.test.ts
index e8e517a3..afa7301a 100644
--- a/exchanges/graphcache/src/extras/relayPagination.test.ts
+++ b/exchanges/graphcache/src/extras/relayPagination.test.ts
@@ -34,9 +34,11 @@ it('works with forward pagination', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
@@ -102,9 +104,11 @@ it('works with backwards pagination', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
@@ -170,9 +174,11 @@ it('handles duplicate edges', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
@@ -244,9 +250,11 @@ it('works with simultaneous forward and backward pagination (outwards merging)',
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination({ mergeMode: 'outwards' }),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination({ mergeMode: 'outwards' }),
+      },
     },
   });
 
@@ -360,9 +368,11 @@ it('works with simultaneous forward and backward pagination (inwards merging)',
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination({ mergeMode: 'inwards' }),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination({ mergeMode: 'inwards' }),
+      },
     },
   });
 
@@ -474,9 +484,11 @@ it('prevents overlapping of pagination on different arguments', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
@@ -544,9 +556,11 @@ it('returns an empty array of edges when the cache has zero edges stored', () =>
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
@@ -581,9 +595,11 @@ it('returns other fields on the same level as the edges', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
@@ -632,14 +648,14 @@ it('returns a subset of the cached items if the query requests less items than t
     }
   `;
 
-  const store = new Store(
-    require('../test-utils/relayPagination_schema.json'),
-    {
+  const store = new Store({
+    schema: require('../test-utils/relayPagination_schema.json'),
+    resolvers: {
       Query: {
         items: relayPagination({ mergeMode: 'outwards' }),
       },
-    }
-  );
+    },
+  });
 
   const results = {
     __typename: 'Query',
@@ -690,14 +706,14 @@ it("returns the cached items even if they don't fullfil the query", () => {
     }
   `;
 
-  const store = new Store(
-    require('../test-utils/relayPagination_schema.json'),
-    {
+  const store = new Store({
+    schema: require('../test-utils/relayPagination_schema.json'),
+    resolvers: {
       Query: {
         items: relayPagination(),
       },
-    }
-  );
+    },
+  });
 
   const results = {
     __typename: 'Query',
@@ -752,14 +768,14 @@ it('returns the cached items even when they come from a different query', () =>
     }
   `;
 
-  const store = new Store(
-    require('../test-utils/relayPagination_schema.json'),
-    {
+  const store = new Store({
+    schema: require('../test-utils/relayPagination_schema.json'),
+    resolvers: {
       Query: {
         items: relayPagination(),
       },
-    }
-  );
+    },
+  });
 
   const results = {
     __typename: 'Query',
@@ -810,14 +826,14 @@ it('caches and retrieves correctly queries with inwards pagination', () => {
     }
   `;
 
-  const store = new Store(
-    require('../test-utils/relayPagination_schema.json'),
-    {
+  const store = new Store({
+    schema: require('../test-utils/relayPagination_schema.json'),
+    resolvers: {
       Query: {
         items: relayPagination(),
       },
-    }
-  );
+    },
+  });
 
   const results = {
     __typename: 'Query',
@@ -872,9 +888,11 @@ it('does not include a previous result when adding parameters', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      items: relayPagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        items: relayPagination(),
+      },
     },
   });
 
diff --git a/exchanges/graphcache/src/extras/simplePagination.test.ts b/exchanges/graphcache/src/extras/simplePagination.test.ts
index db607503..bcf326f2 100644
--- a/exchanges/graphcache/src/extras/simplePagination.test.ts
+++ b/exchanges/graphcache/src/extras/simplePagination.test.ts
@@ -14,9 +14,11 @@ it('works with simple pagination', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      persons: simplePagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        persons: simplePagination(),
+      },
     },
   });
 
@@ -82,9 +84,11 @@ it('handles duplicates', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      persons: simplePagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        persons: simplePagination(),
+      },
     },
   });
 
@@ -138,9 +142,11 @@ it('should not return previous result when adding a parameter', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      persons: simplePagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        persons: simplePagination(),
+      },
     },
   });
 
@@ -187,9 +193,11 @@ it('should preserve the correct order', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      persons: simplePagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        persons: simplePagination(),
+      },
     },
   });
 
@@ -243,9 +251,11 @@ it('prevents overlapping of pagination on different arguments', () => {
     }
   `;
 
-  const store = new Store(undefined, {
-    Query: {
-      persons: simplePagination(),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        persons: simplePagination(),
+      },
     },
   });
 
diff --git a/exchanges/graphcache/src/operations/invalidate.test.ts b/exchanges/graphcache/src/operations/invalidate.test.ts
index 1d6f3a21..9068a15e 100644
--- a/exchanges/graphcache/src/operations/invalidate.test.ts
+++ b/exchanges/graphcache/src/operations/invalidate.test.ts
@@ -29,7 +29,7 @@ describe('Query', () => {
   });
 
   beforeEach(() => {
-    store = new Store(schema);
+    store = new Store({ schema });
     write(
       store,
       { query: TODO_QUERY },
diff --git a/exchanges/graphcache/src/operations/query.test.ts b/exchanges/graphcache/src/operations/query.test.ts
index 7f296c11..cc83f38a 100644
--- a/exchanges/graphcache/src/operations/query.test.ts
+++ b/exchanges/graphcache/src/operations/query.test.ts
@@ -34,7 +34,7 @@ describe('Query', () => {
   });
 
   beforeEach(() => {
-    store = new Store(schema);
+    store = new Store({ schema });
     write(
       store,
       { query: TODO_QUERY },
@@ -120,7 +120,7 @@ describe('Query', () => {
       }
     `;
     // Use new store to ensure bug reproduction
-    const store = new Store(schema);
+    const store = new Store({ schema });
 
     let { data } = query(store, { query: VALID_QUERY });
     expect(data).toEqual(null);
@@ -151,7 +151,7 @@ describe('Query', () => {
       }
     `;
 
-    const store = new Store(alteredRoot);
+    const store = new Store({ schema: alteredRoot });
 
     let { data } = query(store, { query: QUERY });
     expect(data).toEqual(null);
diff --git a/exchanges/graphcache/src/operations/write.test.ts b/exchanges/graphcache/src/operations/write.test.ts
index 4768a94e..16c2ceda 100644
--- a/exchanges/graphcache/src/operations/write.test.ts
+++ b/exchanges/graphcache/src/operations/write.test.ts
@@ -28,7 +28,7 @@ describe('Query', () => {
   });
 
   beforeEach(() => {
-    store = new Store(schema);
+    store = new Store({ schema });
     write(
       store,
       { query: TODO_QUERY },
diff --git a/exchanges/graphcache/src/store/store.test.ts b/exchanges/graphcache/src/store/store.test.ts
index 67a76903..7fee5d2a 100644
--- a/exchanges/graphcache/src/store/store.test.ts
+++ b/exchanges/graphcache/src/store/store.test.ts
@@ -34,9 +34,11 @@ const Todos = gql`
 
 describe('Store with KeyingConfig', () => {
   it('generates keys from custom keying function', () => {
-    const store = new Store(undefined, undefined, undefined, undefined, {
-      User: () => 'me',
-      None: () => null,
+    const store = new Store({
+      keys: {
+        User: () => 'me',
+        None: () => null,
+      },
     });
 
     expect(store.keyOfEntity({ __typename: 'Any', id: '123' })).toBe('Any:123');
@@ -53,11 +55,13 @@ describe('Store with OptimisticMutationConfig', () => {
   let store, todosData;
 
   beforeEach(() => {
-    store = new Store(undefined, undefined, undefined, {
-      addTodo: variables => {
-        return {
-          ...variables,
-        } as Data;
+    store = new Store({
+      optimistic: {
+        addTodo: variables => {
+          return {
+            ...variables,
+          } as Data;
+        },
       },
     });
     todosData = {
diff --git a/exchanges/graphcache/src/test-utils/examples-1.test.ts b/exchanges/graphcache/src/test-utils/examples-1.test.ts
index e0f39521..30195e16 100644
--- a/exchanges/graphcache/src/test-utils/examples-1.test.ts
+++ b/exchanges/graphcache/src/test-utils/examples-1.test.ts
@@ -55,7 +55,7 @@ const NestedClearNameTodo = gql`
 `;
 
 it('passes the "getting-started" example', () => {
-  const store = new Store(undefined);
+  const store = new Store();
   const todosData = {
     __typename: 'Query',
     todos: [
@@ -163,10 +163,12 @@ it('resolves missing, nullable arguments on fields', () => {
 });
 
 it('should link entities', () => {
-  const store = new Store(undefined, {
-    Query: {
-      todo: (_parent, args) => {
-        return { __typename: 'Todo', ...args };
+  const store = new Store({
+    resolvers: {
+      Query: {
+        todo: (_parent, args) => {
+          return { __typename: 'Todo', ...args };
+        },
       },
     },
   });
@@ -194,8 +196,10 @@ it('should link entities', () => {
 });
 
 it('respects property-level resolvers when given', () => {
-  const store = new Store(undefined, {
-    Todo: { text: () => 'hi' },
+  const store = new Store({
+    resolvers: {
+      Todo: { text: () => 'hi' },
+    },
   });
   const todosData = {
     __typename: 'Query',
@@ -254,31 +258,33 @@ it('respects property-level resolvers when given', () => {
 });
 
 it('respects Mutation update functions', () => {
-  const store = new Store(undefined, undefined, {
-    Mutation: {
-      toggleTodo: function toggleTodo(result, _, cache) {
-        cache.updateQuery({ query: Todos }, data => {
-          if (
-            data &&
-            data.todos &&
-            result &&
-            result.toggleTodo &&
-            (result.toggleTodo as any).id === '1'
-          ) {
-            data.todos[1] = {
-              id: '1',
-              text: `${data.todos[1].text} (Updated)`,
-              complete: (result.toggleTodo as any).complete,
-              __typename: 'Todo',
-            };
-          } else if (data && data.todos) {
-            data.todos[Number((result.toggleTodo as any).id)] = {
-              ...data.todos[Number((result.toggleTodo as any).id)],
-              complete: (result.toggleTodo as any).complete,
-            };
-          }
-          return data as Data;
-        });
+  const store = new Store({
+    updates: {
+      Mutation: {
+        toggleTodo: function toggleTodo(result, _, cache) {
+          cache.updateQuery({ query: Todos }, data => {
+            if (
+              data &&
+              data.todos &&
+              result &&
+              result.toggleTodo &&
+              (result.toggleTodo as any).id === '1'
+            ) {
+              data.todos[1] = {
+                id: '1',
+                text: `${data.todos[1].text} (Updated)`,
+                complete: (result.toggleTodo as any).complete,
+                __typename: 'Todo',
+              };
+            } else if (data && data.todos) {
+              data.todos[Number((result.toggleTodo as any).id)] = {
+                ...data.todos[Number((result.toggleTodo as any).id)],
+                complete: (result.toggleTodo as any).complete,
+              };
+            }
+            return data as Data;
+          });
+        },
       },
     },
   });
@@ -342,15 +348,17 @@ it('respects Mutation update functions', () => {
 });
 
 it('correctly resolves optimistic updates on Relay schemas', () => {
-  const store = new Store(undefined, undefined, undefined, {
-    updateItem: variables => ({
-      __typename: 'UpdateItemPayload',
-      item: {
-        __typename: 'Item',
-        id: variables.id as string,
-        name: 'Offline',
-      },
-    }),
+  const store = new Store({
+    optimistic: {
+      updateItem: variables => ({
+        __typename: 'UpdateItemPayload',
+        item: {
+          __typename: 'Item',
+          id: variables.id as string,
+          name: 'Offline',
+        },
+      }),
+    },
   });
 
   const queryData = {
diff --git a/exchanges/graphcache/src/test-utils/examples-2.test.ts b/exchanges/graphcache/src/test-utils/examples-2.test.ts
index 37cce338..486b99aa 100644
--- a/exchanges/graphcache/src/test-utils/examples-2.test.ts
+++ b/exchanges/graphcache/src/test-utils/examples-2.test.ts
@@ -52,28 +52,30 @@ const Pagination = gql`
 `;
 
 it('allows custom resolvers to resolve nested, unkeyed data', () => {
-  const store = new Store(undefined, {
-    Query: {
-      todos: () => ({
-        __typename: 'TodosConnection',
-        edges: [
-          {
-            __typename: 'TodoEdge',
-            node: {
-              __typename: 'Todo',
-              id: '1',
-              // The `complete` field will be overwritten here, but we're
-              // leaving out the `text` field
-              complete: true,
+  const store = new Store({
+    resolvers: {
+      Query: {
+        todos: () => ({
+          __typename: 'TodosConnection',
+          edges: [
+            {
+              __typename: 'TodoEdge',
+              node: {
+                __typename: 'Todo',
+                id: '1',
+                // The `complete` field will be overwritten here, but we're
+                // leaving out the `text` field
+                complete: true,
+              },
             },
+          ],
+          pageInfo: {
+            __typename: 'PageInfo',
+            hasNextPage: true,
+            endCursor: '1',
           },
-        ],
-        pageInfo: {
-          __typename: 'PageInfo',
-          hasNextPage: true,
-          endCursor: '1',
-        },
-      }),
+        }),
+      },
     },
   });
 
@@ -120,23 +122,25 @@ it('allows custom resolvers to resolve nested, unkeyed data', () => {
 });
 
 it('allows custom resolvers to resolve nested, unkeyed data with embedded links', () => {
-  const store = new Store(undefined, {
-    Query: {
-      todos: (_, __, cache) => ({
-        __typename: 'TodosConnection',
-        edges: [
-          {
-            __typename: 'TodoEdge',
-            // This is a key instead of the full entity:
-            node: cache.keyOfEntity({ __typename: 'Todo', id: '1' }),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        todos: (_, __, cache) => ({
+          __typename: 'TodosConnection',
+          edges: [
+            {
+              __typename: 'TodoEdge',
+              // This is a key instead of the full entity:
+              node: cache.keyOfEntity({ __typename: 'Todo', id: '1' }),
+            },
+          ],
+          pageInfo: {
+            __typename: 'PageInfo',
+            hasNextPage: true,
+            endCursor: '1',
           },
-        ],
-        pageInfo: {
-          __typename: 'PageInfo',
-          hasNextPage: true,
-          endCursor: '1',
-        },
-      }),
+        }),
+      },
     },
   });
 
@@ -181,15 +185,17 @@ it('allows custom resolvers to resolve nested, unkeyed data with embedded links'
 });
 
 it('allows custom resolvers to resolve mixed data (keyable and unkeyable)', () => {
-  const store = new Store(undefined, {
-    Query: {
-      todo: () => ({
-        __typename: 'Todo',
-        id: '1',
-        details: {
-          __typename: 'TodoDetails',
-        },
-      }),
+  const store = new Store({
+    resolvers: {
+      Query: {
+        todo: () => ({
+          __typename: 'Todo',
+          id: '1',
+          details: {
+            __typename: 'TodoDetails',
+          },
+        }),
+      },
     },
   });