{"action":"created","comment":{"url":"https://api.github.com/repos/graphql/graphql-js/pulls/comments/71199019","id":71199019,"diff_hunk":"@@ -1,10 +1,11 @@\n-/**\n+/** @flow\n  *  Copyright (c) 2015, Facebook, Inc.\n  *  All rights reserved.\n  *  LICENSE file in the root directory of this source tree. An additional grant\n  *  of patent rights can be found in the PATENTS file in the same directory.\n  */\n-\n+/* eslint quote-props: [\"error\", \"as-needed\",","path":"src/__tests__/starWarsData.js","position":9,"original_position":9,"commit_id":"e2dc75ceb2f521f3e4a2c82e0d5b7c2868aa3aec","original_commit_id":"e2dc75ceb2f521f3e4a2c82e0d5b7c2868aa3aec","user":{"login":"leebyron","id":50130,"avatar_url":"https://avatars.githubusercontent.com/u/50130?v=3","gravatar_id":"","url":"https://api.github.com/users/leebyron","html_url":"https://github.com/leebyron","followers_url":"https://api.github.com/users/leebyron/followers","following_url":"https://api.github.com/users/leebyron/following{/other_user}","gists_url":"https://api.github.com/users/leebyron/gists{/gist_id}","starred_url":"https://api.github.com/users/leebyron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leebyron/subscriptions","organizations_url":"https://api.github.com/users/leebyron/orgs","repos_url":"https://api.github.com/users/leebyron/repos","events_url":"https://api.github.com/users/leebyron/events{/privacy}","received_events_url":"https://api.github.com/users/leebyron/received_events","type":"User","site_admin":false},"body":"This seems unnecessary and distracts from the purpose of the PR, as does changing the quoted props below. Was this necessary?","created_at":"2016-07-18T18:13:33Z","updated_at":"2016-07-18T18:13:33Z","html_url":"https://github.com/graphql/graphql-js/pull/425#discussion_r71199019","pull_request_url":"https://api.github.com/repos/graphql/graphql-js/pulls/425","_links":{"self":{"href":"https://api.github.com/repos/graphql/graphql-js/pulls/comments/71199019"},"html":{"href":"https://github.com/graphql/graphql-js/pull/425#discussion_r71199019"},"pull_request":{"href":"https://api.github.com/repos/graphql/graphql-js/pulls/425"}}},"pull_request":{"url":"https://api.github.com/repos/graphql/graphql-js/pulls/425","id":76728968,"html_url":"https://github.com/graphql/graphql-js/pull/425","diff_url":"https://github.com/graphql/graphql-js/pull/425.diff","patch_url":"https://github.com/graphql/graphql-js/pull/425.patch","issue_url":"https://api.github.com/repos/graphql/graphql-js/issues/425","number":425,"state":"open","locked":false,"title":" `GraphQLObjectTypeConfig<TSource>` to `GraphQLFieldResolveFn<TSource, TResult>`","user":{"login":"iamchenxin","id":8873545,"avatar_url":"https://avatars.githubusercontent.com/u/8873545?v=3","gravatar_id":"","url":"https://api.github.com/users/iamchenxin","html_url":"https://github.com/iamchenxin","followers_url":"https://api.github.com/users/iamchenxin/followers","following_url":"https://api.github.com/users/iamchenxin/following{/other_user}","gists_url":"https://api.github.com/users/iamchenxin/gists{/gist_id}","starred_url":"https://api.github.com/users/iamchenxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamchenxin/subscriptions","organizations_url":"https://api.github.com/users/iamchenxin/orgs","repos_url":"https://api.github.com/users/iamchenxin/repos","events_url":"https://api.github.com/users/iamchenxin/events{/privacy}","received_events_url":"https://api.github.com/users/iamchenxin/received_events","type":"User","site_admin":false},"body":" `GraphQLObjectTypeConfig<TSource>` to `GraphQLFieldResolveFn<TSource, TResult>`\r\nMake user can do a whole top-bottom Flow check between their resolvers.\r\nWith the Flow typed feature, user can ensure his data structure is correspond to schema . ex: [starWarsData.js L103](https://github.com/graphql/graphql-js/commit/046cbba2732be8bbbef74f988fffd04294b583c2#diff-e6e81fa96fbb4bdccb4e3f0042b5f1a3R103)\r\n\r\nMore details see the [src/__tests__/starWarsSchema.js\r\n](https://github.com/graphql/graphql-js/commit/046cbba2732be8bbbef74f988fffd04294b583c2#diff-14d97c822b45992f98d875d53ca45626R112)\r\nA simple demonstration:\r\n```\r\n  type DCPost;\r\n  type DComment;\r\n  type DUser;\r\n  const Post = new GraphQLObjectType({\r\n    name: 'Post',\r\n    fields: () => ({\r\n      ...\r\n      comment: {\r\n        type: new GraphQLList(Comment),\r\n        resolve: (src:DPost):DComment[] => { // Flow check DPost -> DComment[]\r\n          return ...;\r\n        } }\r\n    }),\r\n  });\r\n\r\n  const Comment = new GraphQLObjectType({\r\n    name: 'Comment',\r\n    fields: () => ({\r\n      ...\r\n      user: {\r\n        type: User,\r\n        resolve: (src:DComment):DUser => { // DComment -> DUser\r\n          return ...;\r\n        }\r\n      },\r\n    }),\r\n  });\r\n\r\n  const User = new GraphQLObjectType({\r\n      ...\r\n  });\r\n```\r\n\r\nNote: Because in v0.61 ,in source code use a `any` type to force cast `TSource`. So it is user's responsibility to check the Data Type is not typo. In above code , if ` resolve: (src:DPost):DComment[] ` is typo to ` resolve: (src:DPost):DSomeAnotherType[] `(and user return a wrong data), Flow will still pass. Flow will not check `DSomeAnotherType` is `DComment`,cause of `DSomeAnotherType` -> `any` ->  `DComment`","created_at":"2016-07-08T10:01:01Z","updated_at":"2016-07-18T18:13:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af05209e7e43a8acfd40d1444f23a3610f7fc69f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/graphql/graphql-js/pulls/425/commits","review_comments_url":"https://api.github.com/repos/graphql/graphql-js/pulls/425/comments","review_comment_url":"https://api.github.com/repos/graphql/graphql-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/graphql/graphql-js/issues/425/comments","statuses_url":"https://api.github.com/repos/graphql/graphql-js/statuses/e2dc75ceb2f521f3e4a2c82e0d5b7c2868aa3aec","head":{"label":"iamchenxin:GraphQLFieldResolveFn","ref":"GraphQLFieldResolveFn","sha":"e2dc75ceb2f521f3e4a2c82e0d5b7c2868aa3aec","user":{"login":"iamchenxin","id":8873545,"avatar_url":"https://avatars.githubusercontent.com/u/8873545?v=3","gravatar_id":"","url":"https://api.github.com/users/iamchenxin","html_url":"https://github.com/iamchenxin","followers_url":"https://api.github.com/users/iamchenxin/followers","following_url":"https://api.github.com/users/iamchenxin/following{/other_user}","gists_url":"https://api.github.com/users/iamchenxin/gists{/gist_id}","starred_url":"https://api.github.com/users/iamchenxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamchenxin/subscriptions","organizations_url":"https://api.github.com/users/iamchenxin/orgs","repos_url":"https://api.github.com/users/iamchenxin/repos","events_url":"https://api.github.com/users/iamchenxin/events{/privacy}","received_events_url":"https://api.github.com/users/iamchenxin/received_events","type":"User","site_admin":false},"repo":{"id":47125418,"name":"graphql-js","full_name":"iamchenxin/graphql-js","owner":{"login":"iamchenxin","id":8873545,"avatar_url":"https://avatars.githubusercontent.com/u/8873545?v=3","gravatar_id":"","url":"https://api.github.com/users/iamchenxin","html_url":"https://github.com/iamchenxin","followers_url":"https://api.github.com/users/iamchenxin/followers","following_url":"https://api.github.com/users/iamchenxin/following{/other_user}","gists_url":"https://api.github.com/users/iamchenxin/gists{/gist_id}","starred_url":"https://api.github.com/users/iamchenxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamchenxin/subscriptions","organizations_url":"https://api.github.com/users/iamchenxin/orgs","repos_url":"https://api.github.com/users/iamchenxin/repos","events_url":"https://api.github.com/users/iamchenxin/events{/privacy}","received_events_url":"https://api.github.com/users/iamchenxin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamchenxin/graphql-js","description":"A reference implementation of GraphQL for JavaScript","fork":true,"url":"https://api.github.com/repos/iamchenxin/graphql-js","forks_url":"https://api.github.com/repos/iamchenxin/graphql-js/forks","keys_url":"https://api.github.com/repos/iamchenxin/graphql-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamchenxin/graphql-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamchenxin/graphql-js/teams","hooks_url":"https://api.github.com/repos/iamchenxin/graphql-js/hooks","issue_events_url":"https://api.github.com/repos/iamchenxin/graphql-js/issues/events{/number}","events_url":"https://api.github.com/repos/iamchenxin/graphql-js/events","assignees_url":"https://api.github.com/repos/iamchenxin/graphql-js/assignees{/user}","branches_url":"https://api.github.com/repos/iamchenxin/graphql-js/branches{/branch}","tags_url":"https://api.github.com/repos/iamchenxin/graphql-js/tags","blobs_url":"https://api.github.com/repos/iamchenxin/graphql-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamchenxin/graphql-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamchenxin/graphql-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamchenxin/graphql-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamchenxin/graphql-js/statuses/{sha}","languages_url":"https://api.github.com/repos/iamchenxin/graphql-js/languages","stargazers_url":"https://api.github.com/repos/iamchenxin/graphql-js/stargazers","contributors_url":"https://api.github.com/repos/iamchenxin/graphql-js/contributors","subscribers_url":"https://api.github.com/repos/iamchenxin/graphql-js/subscribers","subscription_url":"https://api.github.com/repos/iamchenxin/graphql-js/subscription","commits_url":"https://api.github.com/repos/iamchenxin/graphql-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamchenxin/graphql-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamchenxin/graphql-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamchenxin/graphql-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamchenxin/graphql-js/contents/{+path}","compare_url":"https://api.github.com/repos/iamchenxin/graphql-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamchenxin/graphql-js/merges","archive_url":"https://api.github.com/repos/iamchenxin/graphql-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamchenxin/graphql-js/downloads","issues_url":"https://api.github.com/repos/iamchenxin/graphql-js/issues{/number}","pulls_url":"https://api.github.com/repos/iamchenxin/graphql-js/pulls{/number}","milestones_url":"https://api.github.com/repos/iamchenxin/graphql-js/milestones{/number}","notifications_url":"https://api.github.com/repos/iamchenxin/graphql-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamchenxin/graphql-js/labels{/name}","releases_url":"https://api.github.com/repos/iamchenxin/graphql-js/releases{/id}","deployments_url":"https://api.github.com/repos/iamchenxin/graphql-js/deployments","created_at":"2015-11-30T14:49:48Z","updated_at":"2016-01-15T17:08:02Z","pushed_at":"2016-07-08T12:58:34Z","git_url":"git://github.com/iamchenxin/graphql-js.git","ssh_url":"git@github.com:iamchenxin/graphql-js.git","clone_url":"https://github.com/iamchenxin/graphql-js.git","svn_url":"https://github.com/iamchenxin/graphql-js","homepage":null,"size":1327,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"graphql:master","ref":"master","sha":"826cba3b76e87dbd25a01db5150f89624adaab32","user":{"login":"graphql","id":12972006,"avatar_url":"https://avatars.githubusercontent.com/u/12972006?v=3","gravatar_id":"","url":"https://api.github.com/users/graphql","html_url":"https://github.com/graphql","followers_url":"https://api.github.com/users/graphql/followers","following_url":"https://api.github.com/users/graphql/following{/other_user}","gists_url":"https://api.github.com/users/graphql/gists{/gist_id}","starred_url":"https://api.github.com/users/graphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphql/subscriptions","organizations_url":"https://api.github.com/users/graphql/orgs","repos_url":"https://api.github.com/users/graphql/repos","events_url":"https://api.github.com/users/graphql/events{/privacy}","received_events_url":"https://api.github.com/users/graphql/received_events","type":"Organization","site_admin":false},"repo":{"id":38307428,"name":"graphql-js","full_name":"graphql/graphql-js","owner":{"login":"graphql","id":12972006,"avatar_url":"https://avatars.githubusercontent.com/u/12972006?v=3","gravatar_id":"","url":"https://api.github.com/users/graphql","html_url":"https://github.com/graphql","followers_url":"https://api.github.com/users/graphql/followers","following_url":"https://api.github.com/users/graphql/following{/other_user}","gists_url":"https://api.github.com/users/graphql/gists{/gist_id}","starred_url":"https://api.github.com/users/graphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphql/subscriptions","organizations_url":"https://api.github.com/users/graphql/orgs","repos_url":"https://api.github.com/users/graphql/repos","events_url":"https://api.github.com/users/graphql/events{/privacy}","received_events_url":"https://api.github.com/users/graphql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/graphql/graphql-js","description":"A reference implementation of GraphQL for JavaScript","fork":false,"url":"https://api.github.com/repos/graphql/graphql-js","forks_url":"https://api.github.com/repos/graphql/graphql-js/forks","keys_url":"https://api.github.com/repos/graphql/graphql-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/graphql/graphql-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/graphql/graphql-js/teams","hooks_url":"https://api.github.com/repos/graphql/graphql-js/hooks","issue_events_url":"https://api.github.com/repos/graphql/graphql-js/issues/events{/number}","events_url":"https://api.github.com/repos/graphql/graphql-js/events","assignees_url":"https://api.github.com/repos/graphql/graphql-js/assignees{/user}","branches_url":"https://api.github.com/repos/graphql/graphql-js/branches{/branch}","tags_url":"https://api.github.com/repos/graphql/graphql-js/tags","blobs_url":"https://api.github.com/repos/graphql/graphql-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/graphql/graphql-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/graphql/graphql-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/graphql/graphql-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/graphql/graphql-js/statuses/{sha}","languages_url":"https://api.github.com/repos/graphql/graphql-js/languages","stargazers_url":"https://api.github.com/repos/graphql/graphql-js/stargazers","contributors_url":"https://api.github.com/repos/graphql/graphql-js/contributors","subscribers_url":"https://api.github.com/repos/graphql/graphql-js/subscribers","subscription_url":"https://api.github.com/repos/graphql/graphql-js/subscription","commits_url":"https://api.github.com/repos/graphql/graphql-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/graphql/graphql-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/graphql/graphql-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/graphql/graphql-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/graphql/graphql-js/contents/{+path}","compare_url":"https://api.github.com/repos/graphql/graphql-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/graphql/graphql-js/merges","archive_url":"https://api.github.com/repos/graphql/graphql-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/graphql/graphql-js/downloads","issues_url":"https://api.github.com/repos/graphql/graphql-js/issues{/number}","pulls_url":"https://api.github.com/repos/graphql/graphql-js/pulls{/number}","milestones_url":"https://api.github.com/repos/graphql/graphql-js/milestones{/number}","notifications_url":"https://api.github.com/repos/graphql/graphql-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/graphql/graphql-js/labels{/name}","releases_url":"https://api.github.com/repos/graphql/graphql-js/releases{/id}","deployments_url":"https://api.github.com/repos/graphql/graphql-js/deployments","created_at":"2015-06-30T12:16:50Z","updated_at":"2016-07-18T14:55:30Z","pushed_at":"2016-07-18T18:09:27Z","git_url":"git://github.com/graphql/graphql-js.git","ssh_url":"git@github.com:graphql/graphql-js.git","clone_url":"https://github.com/graphql/graphql-js.git","svn_url":"https://github.com/graphql/graphql-js","homepage":null,"size":1582,"stargazers_count":3972,"watchers_count":3972,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":267,"mirror_url":null,"open_issues_count":59,"forks":267,"open_issues":59,"watchers":3972,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/graphql/graphql-js/pulls/425"},"html":{"href":"https://github.com/graphql/graphql-js/pull/425"},"issue":{"href":"https://api.github.com/repos/graphql/graphql-js/issues/425"},"comments":{"href":"https://api.github.com/repos/graphql/graphql-js/issues/425/comments"},"review_comments":{"href":"https://api.github.com/repos/graphql/graphql-js/pulls/425/comments"},"review_comment":{"href":"https://api.github.com/repos/graphql/graphql-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/graphql/graphql-js/pulls/425/commits"},"statuses":{"href":"https://api.github.com/repos/graphql/graphql-js/statuses/e2dc75ceb2f521f3e4a2c82e0d5b7c2868aa3aec"}}}}
{"actor":{"display_login":"leebyron"}}