{"action":"opened","number":1631,"pull_request":{"url":"https://api.github.com/repos/apollographql/react-apollo/pulls/1631","id":167096534,"html_url":"https://github.com/apollographql/react-apollo/pull/1631","diff_url":"https://github.com/apollographql/react-apollo/pull/1631.diff","patch_url":"https://github.com/apollographql/react-apollo/pull/1631.patch","issue_url":"https://api.github.com/repos/apollographql/react-apollo/issues/1631","number":1631,"state":"open","locked":false,"title":"currentResult: use \"errors\" (plural) instead of \"error\"","user":{"login":"twelve17","id":788325,"avatar_url":"https://avatars1.githubusercontent.com/u/788325?v=4","gravatar_id":"","url":"https://api.github.com/users/twelve17","html_url":"https://github.com/twelve17","followers_url":"https://api.github.com/users/twelve17/followers","following_url":"https://api.github.com/users/twelve17/following{/other_user}","gists_url":"https://api.github.com/users/twelve17/gists{/gist_id}","starred_url":"https://api.github.com/users/twelve17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twelve17/subscriptions","organizations_url":"https://api.github.com/users/twelve17/orgs","repos_url":"https://api.github.com/users/twelve17/repos","events_url":"https://api.github.com/users/twelve17/events{/privacy}","received_events_url":"https://api.github.com/users/twelve17/received_events","type":"User","site_admin":false},"body":"Fixes #1389.\r\n\r\n**Note: this needs assistance before accepting.**\r\n\r\nAccording to the [Apollo Docs](http://graphql.org/learn/serving-over-http/#response), the `response` object contains an `errors` (plural) attribute with an array of errors, whereas the client is looking for a single `error` attribute.\r\n\r\nApologies for not being able to correct the unit tests thus far, as I am not super well versed in typescript, and it seems that I've managed to run into a problem refactoring the tests anyway:\r\n\r\n[The `MockedResponse` type in the `test-links` file](https://github.com/apollographql/react-apollo/blob/master/src/test-links.ts#L12) has an  `error` attribute, and all tests are configured to use it. However, I see tests that are also testing network errors.  In such cases, it doesn't make sense to be using a `MockedResponse` since, in theory, there was not a response, and it seems like a different code path for resolution on the client side.  \r\n\r\nAlternatively, I wasn't sure if I should have made the `MockedResponse` have _both_  `error` and `errors` properties, so both network errors and graphql error use cases could be handled in the tests.\r\n\r\nAssistance would be greatly appreciated.\r\n\r\n<!--\r\n  Thanks for filing a pull request on React Apollo!\r\n\r\n  A few automated bots may chime in on your PR. They are here to help\r\n  with reviewing and ensuring React Apollo is production ready after each\r\n  pull request merge.\r\n\r\n    - meteor-bot will respond asking you to sign the CLA if this is your first PR.\r\n      It may also respond with warnings, messages, or fail the build if something is off.\r\n      Don't worry, it'll help you to fix what is broken!\r\n\r\n    - bundlesize is a status check to keep the footprint of React Apollo as small as possible.\r\n\r\n    - travis-ci will run tests, checking style of code, and generally make\r\n      sure everything is working as expected\r\n\r\n  Please look at the following checklist to ensure that your PR\r\n  can be accepted quickly:\r\n-->\r\n\r\n### Checklist:\r\n\r\n* [ ] If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)\r\n* [ ] Make sure all of the significant new logic is covered by tests\r\n* [ ] If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion.","created_at":"2018-02-05T09:43:16Z","updated_at":"2018-02-05T09:43:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/apollographql/react-apollo/pulls/1631/commits","review_comments_url":"https://api.github.com/repos/apollographql/react-apollo/pulls/1631/comments","review_comment_url":"https://api.github.com/repos/apollographql/react-apollo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apollographql/react-apollo/issues/1631/comments","statuses_url":"https://api.github.com/repos/apollographql/react-apollo/statuses/452b6b0c0b4b63c0cb663b964ea3ba18ca676242","head":{"label":"twelve17:error-vs-errors","ref":"error-vs-errors","sha":"452b6b0c0b4b63c0cb663b964ea3ba18ca676242","user":{"login":"twelve17","id":788325,"avatar_url":"https://avatars1.githubusercontent.com/u/788325?v=4","gravatar_id":"","url":"https://api.github.com/users/twelve17","html_url":"https://github.com/twelve17","followers_url":"https://api.github.com/users/twelve17/followers","following_url":"https://api.github.com/users/twelve17/following{/other_user}","gists_url":"https://api.github.com/users/twelve17/gists{/gist_id}","starred_url":"https://api.github.com/users/twelve17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twelve17/subscriptions","organizations_url":"https://api.github.com/users/twelve17/orgs","repos_url":"https://api.github.com/users/twelve17/repos","events_url":"https://api.github.com/users/twelve17/events{/privacy}","received_events_url":"https://api.github.com/users/twelve17/received_events","type":"User","site_admin":false},"repo":{"id":120280462,"name":"react-apollo","full_name":"twelve17/react-apollo","owner":{"login":"twelve17","id":788325,"avatar_url":"https://avatars1.githubusercontent.com/u/788325?v=4","gravatar_id":"","url":"https://api.github.com/users/twelve17","html_url":"https://github.com/twelve17","followers_url":"https://api.github.com/users/twelve17/followers","following_url":"https://api.github.com/users/twelve17/following{/other_user}","gists_url":"https://api.github.com/users/twelve17/gists{/gist_id}","starred_url":"https://api.github.com/users/twelve17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twelve17/subscriptions","organizations_url":"https://api.github.com/users/twelve17/orgs","repos_url":"https://api.github.com/users/twelve17/repos","events_url":"https://api.github.com/users/twelve17/events{/privacy}","received_events_url":"https://api.github.com/users/twelve17/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/twelve17/react-apollo","description":":recycle: React higher-order component for Apollo Client","fork":true,"url":"https://api.github.com/repos/twelve17/react-apollo","forks_url":"https://api.github.com/repos/twelve17/react-apollo/forks","keys_url":"https://api.github.com/repos/twelve17/react-apollo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twelve17/react-apollo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twelve17/react-apollo/teams","hooks_url":"https://api.github.com/repos/twelve17/react-apollo/hooks","issue_events_url":"https://api.github.com/repos/twelve17/react-apollo/issues/events{/number}","events_url":"https://api.github.com/repos/twelve17/react-apollo/events","assignees_url":"https://api.github.com/repos/twelve17/react-apollo/assignees{/user}","branches_url":"https://api.github.com/repos/twelve17/react-apollo/branches{/branch}","tags_url":"https://api.github.com/repos/twelve17/react-apollo/tags","blobs_url":"https://api.github.com/repos/twelve17/react-apollo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twelve17/react-apollo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twelve17/react-apollo/git/refs{/sha}","trees_url":"https://api.github.com/repos/twelve17/react-apollo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twelve17/react-apollo/statuses/{sha}","languages_url":"https://api.github.com/repos/twelve17/react-apollo/languages","stargazers_url":"https://api.github.com/repos/twelve17/react-apollo/stargazers","contributors_url":"https://api.github.com/repos/twelve17/react-apollo/contributors","subscribers_url":"https://api.github.com/repos/twelve17/react-apollo/subscribers","subscription_url":"https://api.github.com/repos/twelve17/react-apollo/subscription","commits_url":"https://api.github.com/repos/twelve17/react-apollo/commits{/sha}","git_commits_url":"https://api.github.com/repos/twelve17/react-apollo/git/commits{/sha}","comments_url":"https://api.github.com/repos/twelve17/react-apollo/comments{/number}","issue_comment_url":"https://api.github.com/repos/twelve17/react-apollo/issues/comments{/number}","contents_url":"https://api.github.com/repos/twelve17/react-apollo/contents/{+path}","compare_url":"https://api.github.com/repos/twelve17/react-apollo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twelve17/react-apollo/merges","archive_url":"https://api.github.com/repos/twelve17/react-apollo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twelve17/react-apollo/downloads","issues_url":"https://api.github.com/repos/twelve17/react-apollo/issues{/number}","pulls_url":"https://api.github.com/repos/twelve17/react-apollo/pulls{/number}","milestones_url":"https://api.github.com/repos/twelve17/react-apollo/milestones{/number}","notifications_url":"https://api.github.com/repos/twelve17/react-apollo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twelve17/react-apollo/labels{/name}","releases_url":"https://api.github.com/repos/twelve17/react-apollo/releases{/id}","deployments_url":"https://api.github.com/repos/twelve17/react-apollo/deployments","created_at":"2018-02-05T09:07:30Z","updated_at":"2018-02-05T09:07:32Z","pushed_at":"2018-02-05T09:37:44Z","git_url":"git://github.com/twelve17/react-apollo.git","ssh_url":"git@github.com:twelve17/react-apollo.git","clone_url":"https://github.com/twelve17/react-apollo.git","svn_url":"https://github.com/twelve17/react-apollo","homepage":"https://www.apollographql.com/docs/react/","size":3008,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apollographql:master","ref":"master","sha":"b1ba42fc948983104f8368f2a22ed4e9be0ecb99","user":{"login":"apollographql","id":17189275,"avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"repo":{"id":56192185,"name":"react-apollo","full_name":"apollographql/react-apollo","owner":{"login":"apollographql","id":17189275,"avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apollographql/react-apollo","description":":recycle: React higher-order component for Apollo Client","fork":false,"url":"https://api.github.com/repos/apollographql/react-apollo","forks_url":"https://api.github.com/repos/apollographql/react-apollo/forks","keys_url":"https://api.github.com/repos/apollographql/react-apollo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apollographql/react-apollo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apollographql/react-apollo/teams","hooks_url":"https://api.github.com/repos/apollographql/react-apollo/hooks","issue_events_url":"https://api.github.com/repos/apollographql/react-apollo/issues/events{/number}","events_url":"https://api.github.com/repos/apollographql/react-apollo/events","assignees_url":"https://api.github.com/repos/apollographql/react-apollo/assignees{/user}","branches_url":"https://api.github.com/repos/apollographql/react-apollo/branches{/branch}","tags_url":"https://api.github.com/repos/apollographql/react-apollo/tags","blobs_url":"https://api.github.com/repos/apollographql/react-apollo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apollographql/react-apollo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apollographql/react-apollo/git/refs{/sha}","trees_url":"https://api.github.com/repos/apollographql/react-apollo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apollographql/react-apollo/statuses/{sha}","languages_url":"https://api.github.com/repos/apollographql/react-apollo/languages","stargazers_url":"https://api.github.com/repos/apollographql/react-apollo/stargazers","contributors_url":"https://api.github.com/repos/apollographql/react-apollo/contributors","subscribers_url":"https://api.github.com/repos/apollographql/react-apollo/subscribers","subscription_url":"https://api.github.com/repos/apollographql/react-apollo/subscription","commits_url":"https://api.github.com/repos/apollographql/react-apollo/commits{/sha}","git_commits_url":"https://api.github.com/repos/apollographql/react-apollo/git/commits{/sha}","comments_url":"https://api.github.com/repos/apollographql/react-apollo/comments{/number}","issue_comment_url":"https://api.github.com/repos/apollographql/react-apollo/issues/comments{/number}","contents_url":"https://api.github.com/repos/apollographql/react-apollo/contents/{+path}","compare_url":"https://api.github.com/repos/apollographql/react-apollo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apollographql/react-apollo/merges","archive_url":"https://api.github.com/repos/apollographql/react-apollo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apollographql/react-apollo/downloads","issues_url":"https://api.github.com/repos/apollographql/react-apollo/issues{/number}","pulls_url":"https://api.github.com/repos/apollographql/react-apollo/pulls{/number}","milestones_url":"https://api.github.com/repos/apollographql/react-apollo/milestones{/number}","notifications_url":"https://api.github.com/repos/apollographql/react-apollo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apollographql/react-apollo/labels{/name}","releases_url":"https://api.github.com/repos/apollographql/react-apollo/releases{/id}","deployments_url":"https://api.github.com/repos/apollographql/react-apollo/deployments","created_at":"2016-04-13T23:14:51Z","updated_at":"2018-02-05T09:20:28Z","pushed_at":"2018-02-05T09:40:43Z","git_url":"git://github.com/apollographql/react-apollo.git","ssh_url":"git@github.com:apollographql/react-apollo.git","clone_url":"https://github.com/apollographql/react-apollo.git","svn_url":"https://github.com/apollographql/react-apollo","homepage":"https://www.apollographql.com/docs/react/","size":3011,"stargazers_count":2199,"watchers_count":2199,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":306,"mirror_url":null,"archived":false,"open_issues_count":109,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":306,"open_issues":109,"watchers":2199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apollographql/react-apollo/pulls/1631"},"html":{"href":"https://github.com/apollographql/react-apollo/pull/1631"},"issue":{"href":"https://api.github.com/repos/apollographql/react-apollo/issues/1631"},"comments":{"href":"https://api.github.com/repos/apollographql/react-apollo/issues/1631/comments"},"review_comments":{"href":"https://api.github.com/repos/apollographql/react-apollo/pulls/1631/comments"},"review_comment":{"href":"https://api.github.com/repos/apollographql/react-apollo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apollographql/react-apollo/pulls/1631/commits"},"statuses":{"href":"https://api.github.com/repos/apollographql/react-apollo/statuses/452b6b0c0b4b63c0cb663b964ea3ba18ca676242"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":6,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"twelve17"}}