From abadbbc2eefe4cbd400db49715011da0858b96cf Mon Sep 17 00:00:00 2001 From: Shachar Ben David Date: Thu, 12 Apr 2018 16:57:58 +0300 Subject: [PATCH 01/10] Remove Object.setPrototypeOf() Object.setPrototypeOf() doesn't work on Android --- packages/apollo-client/src/errors/ApolloError.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apollo-client/src/errors/ApolloError.ts b/packages/apollo-client/src/errors/ApolloError.ts index ebc7ab79409..369105c4ced 100644 --- a/packages/apollo-client/src/errors/ApolloError.ts +++ b/packages/apollo-client/src/errors/ApolloError.ts @@ -65,6 +65,6 @@ export class ApolloError extends Error { this.extraInfo = extraInfo; - Object.setPrototypeOf(this, ApolloError.prototype); + this.__proto__ = ApolloError.prototype; } } From 3e873db42204dbc7ae29004ba494a802b007d1d9 Mon Sep 17 00:00:00 2001 From: Shachar Ben David Date: Thu, 12 Apr 2018 17:04:25 +0300 Subject: [PATCH 02/10] Fix TypeScript error --- packages/apollo-client/src/errors/ApolloError.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apollo-client/src/errors/ApolloError.ts b/packages/apollo-client/src/errors/ApolloError.ts index 369105c4ced..20b1d9aab4b 100644 --- a/packages/apollo-client/src/errors/ApolloError.ts +++ b/packages/apollo-client/src/errors/ApolloError.ts @@ -65,6 +65,6 @@ export class ApolloError extends Error { this.extraInfo = extraInfo; - this.__proto__ = ApolloError.prototype; + (this as any).__proto__ = ApolloError.prototype; } } From 42086976386f4a562586d9ea5b61356dc6a9f988 Mon Sep 17 00:00:00 2001 From: Shachar Ben David Date: Thu, 12 Apr 2018 17:10:08 +0300 Subject: [PATCH 03/10] Update CHANGELOG.md --- packages/apollo-client/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/apollo-client/CHANGELOG.md b/packages/apollo-client/CHANGELOG.md index b66184f82ca..4e65368cf01 100644 --- a/packages/apollo-client/CHANGELOG.md +++ b/packages/apollo-client/CHANGELOG.md @@ -4,6 +4,7 @@ ### vNEXT - fixed edge case bug of changing fetchPolicies right after resetStore with no variables present +- fixed Android error when error handling ### 2.2.8 - Added the graphQLResultHasError in QueryManager.ts to check not only if result.errors is null, but also empty. From 94ed8f77beaf3d3b3e6ec355372ea01e7e83dfff Mon Sep 17 00:00:00 2001 From: "Pascal Senn (GIAPSE)" Date: Fri, 11 May 2018 14:34:35 +0200 Subject: [PATCH 04/10] docs(Mutation): removes client from docs --- docs/source/essentials/mutations.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/essentials/mutations.md b/docs/source/essentials/mutations.md index 441ce9212bc..7f5623d59ab 100644 --- a/docs/source/essentials/mutations.md +++ b/docs/source/essentials/mutations.md @@ -266,8 +266,6 @@ The render prop function that you pass to the `children` prop of `Mutation` is c
Any errors returned from the mutation
`called`: boolean
A boolean indicating if the mutate function has been called
-
`client`: ApolloClient
-
Your `ApolloClient` instance. Useful for invoking cache methods outside the context of the update function, such as `client.writeData` and `client.readQuery`.

Next steps

From ca5a21169670c5517b5dd6d8ca64a4b128b35444 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 11 May 2018 14:10:02 +0000 Subject: [PATCH 05/10] chore(deps): update dependency @types/node to v8.10.14 --- packages/apollo-client/package.json | 2 +- packages/apollo-utilities/package.json | 2 +- packages/graphql-anywhere/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/apollo-client/package.json b/packages/apollo-client/package.json index 4fb18df2b78..840e370443e 100644 --- a/packages/apollo-client/package.json +++ b/packages/apollo-client/package.json @@ -62,7 +62,7 @@ "@types/isomorphic-fetch": "0.0.34", "@types/jest": "21.1.10", "@types/lodash": "4.14.108", - "@types/node": "8.10.13", + "@types/node": "8.10.14", "apollo-cache-inmemory": "^1.2.1", "benchmark": "2.1.4", "browserify": "15.2.0", diff --git a/packages/apollo-utilities/package.json b/packages/apollo-utilities/package.json index 46982d5b139..3e93ccf4dcf 100644 --- a/packages/apollo-utilities/package.json +++ b/packages/apollo-utilities/package.json @@ -41,7 +41,7 @@ "@types/graphql": "0.12.7", "@types/jest": "21.1.10", "@types/lodash": "4.14.108", - "@types/node": "8.10.13", + "@types/node": "8.10.14", "browserify": "15.2.0", "flow-bin": "0.72.0", "graphql": "0.13.2", diff --git a/packages/graphql-anywhere/package.json b/packages/graphql-anywhere/package.json index e3a45d57859..ab4566a7810 100644 --- a/packages/graphql-anywhere/package.json +++ b/packages/graphql-anywhere/package.json @@ -45,7 +45,7 @@ "@types/isomorphic-fetch": "0.0.34", "@types/jest": "21.1.10", "@types/lodash": "4.14.108", - "@types/node": "8.10.13", + "@types/node": "8.10.14", "@types/react": "16.0.34", "@types/react-dom": "16.0.4", "browserify": "15.2.0", From 6adc1b1a87a5282788f0146a96d27a57b8c6a85c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 12 May 2018 16:13:40 +0000 Subject: [PATCH 06/10] chore(deps): update dependency webpack to v3.12.0 --- packages/apollo-client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apollo-client/package.json b/packages/apollo-client/package.json index 840e370443e..38d85ccf215 100644 --- a/packages/apollo-client/package.json +++ b/packages/apollo-client/package.json @@ -82,7 +82,7 @@ "tslint": "5.10.0", "typescript": "2.4.2", "uglify-js": "3.3.24", - "webpack": "3.10.0", + "webpack": "3.12.0", "webpack-bundle-analyzer": "2.11.2" }, "optionalDependencies": { From 63d2b87e6fdb13b44564ec7a43b97d366fd0cf30 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Mon, 14 May 2018 06:38:25 -0400 Subject: [PATCH 07/10] Explain why `Object.setPrototypeOf` isn't being used --- packages/apollo-client/src/errors/ApolloError.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/apollo-client/src/errors/ApolloError.ts b/packages/apollo-client/src/errors/ApolloError.ts index 20b1d9aab4b..46979df234b 100644 --- a/packages/apollo-client/src/errors/ApolloError.ts +++ b/packages/apollo-client/src/errors/ApolloError.ts @@ -65,6 +65,8 @@ export class ApolloError extends Error { this.extraInfo = extraInfo; + // We're not using `Object.setPrototypeOf` here as it isn't fully + // supported on Android (see issue #3236). (this as any).__proto__ = ApolloError.prototype; } } From 2cfa89a43fbaa61f711f2821b823742618e1834d Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Mon, 14 May 2018 07:14:12 -0400 Subject: [PATCH 08/10] Remove danger AUTHOR request We're currently reminding contributors to add their name to the `AUTHORS` file on every PR, whether they've added their name already or not. This creates a fair bit of PR noise. After some internal discussion, we've decided that maintaining the `AUTHORS` file isn't really needed anymore. Contributor details are already tracked using GitHub's contributors functionality, and the original intent of the `AUTHORS` file (to support people from companies that only allow contributions if their name can be included in a specific contribution file) is no longer a priority. This commit removes the `AUTHORS` danger check. We'll keep the `AUTHORS` file in place for now. --- dangerfile.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/dangerfile.ts b/dangerfile.ts index 8224a7f028b..396c32b25e3 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -116,7 +116,4 @@ if (!isBot) { ); }); raiseIssueAboutPaths(fail, onlyTestFiles, 'an `only` was left in the test'); - - // Politely ask for their name in the authors file - message('Please add your name and email to the AUTHORS file (optional)'); } From 287133409a3b32192c12c295b98ac9f002f4a6af Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Mon, 14 May 2018 11:17:11 -0400 Subject: [PATCH 09/10] Exclude src files when publishing to npm Fixes https://github.com/apollographql/apollo-client/issues/2806 --- packages/graphql-anywhere/.npmignore | 1 + packages/graphql-anywhere/CHANGELOG.md | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 packages/graphql-anywhere/.npmignore diff --git a/packages/graphql-anywhere/.npmignore b/packages/graphql-anywhere/.npmignore new file mode 100644 index 00000000000..85de9cf9334 --- /dev/null +++ b/packages/graphql-anywhere/.npmignore @@ -0,0 +1 @@ +src diff --git a/packages/graphql-anywhere/CHANGELOG.md b/packages/graphql-anywhere/CHANGELOG.md index 2e6eb9691b2..b5be937478f 100644 --- a/packages/graphql-anywhere/CHANGELOG.md +++ b/packages/graphql-anywhere/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log +### vNext + +- Source files are now excluded when publishing to npm. + [Issue #2806](https://github.com/apollographql/apollo-client/issues/2806) + [PR XXX]() + ### 4.1.10 - Fix [#3393](https://github.com/apollographql/apollo-client/issues/3393) [PR #3403](https://github.com/apollographql/apollo-client/pull/3403) From c532270571aea70c084ab2a92a87883cac6e4ad4 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Mon, 14 May 2018 11:21:05 -0400 Subject: [PATCH 10/10] Add PR link --- packages/graphql-anywhere/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphql-anywhere/CHANGELOG.md b/packages/graphql-anywhere/CHANGELOG.md index b5be937478f..dda505e3801 100644 --- a/packages/graphql-anywhere/CHANGELOG.md +++ b/packages/graphql-anywhere/CHANGELOG.md @@ -4,7 +4,7 @@ - Source files are now excluded when publishing to npm. [Issue #2806](https://github.com/apollographql/apollo-client/issues/2806) - [PR XXX]() + [PR #3454](https://github.com/apollographql/apollo-client/pull/3454) ### 4.1.10 - Fix [#3393](https://github.com/apollographql/apollo-client/issues/3393)