{"action":"created","comment":{"url":"https://api.github.com/repos/apollostack/graphql-tag/pulls/comments/91812903","pull_request_review_id":12326318,"id":91812903,"diff_hunk":"@@ -23,11 +25,13 @@ function resetCaches() {\n }\n \n // Take a unstripped parsed document (query/mutation or even fragment), and\n-// check all fragment definitions, checking for name->source uniqueness\n+// check all fragment definitions, checking for name->source uniqueness.\n+// We also want to make sure only unique fragments exist in the document.\n var printFragmentWarnings = true;\n function checkFragments(ast) {","path":"index.js","position":14,"original_position":14,"commit_id":"ae722cddb710240151eeff044606eee946c51c0f","original_commit_id":"ae722cddb710240151eeff044606eee946c51c0f","user":{"login":"stubailo","id":448783,"avatar_url":"https://avatars.githubusercontent.com/u/448783?v=3","gravatar_id":"","url":"https://api.github.com/users/stubailo","html_url":"https://github.com/stubailo","followers_url":"https://api.github.com/users/stubailo/followers","following_url":"https://api.github.com/users/stubailo/following{/other_user}","gists_url":"https://api.github.com/users/stubailo/gists{/gist_id}","starred_url":"https://api.github.com/users/stubailo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubailo/subscriptions","organizations_url":"https://api.github.com/users/stubailo/orgs","repos_url":"https://api.github.com/users/stubailo/repos","events_url":"https://api.github.com/users/stubailo/events{/privacy}","received_events_url":"https://api.github.com/users/stubailo/received_events","type":"User","site_admin":false},"body":"I think now that this function actually makes modifications to the AST, it should be called something else, like `processFragments`. It just struck me that `parsed = checkFragments(parsed)` looks weird since why would `checkFragments` have a return value?","created_at":"2016-12-09T23:04:44Z","updated_at":"2016-12-09T23:05:13Z","html_url":"https://github.com/apollostack/graphql-tag/pull/28#discussion_r91812903","pull_request_url":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/apollostack/graphql-tag/pulls/comments/91812903"},"html":{"href":"https://github.com/apollostack/graphql-tag/pull/28#discussion_r91812903"},"pull_request":{"href":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28","id":97165292,"html_url":"https://github.com/apollostack/graphql-tag/pull/28","diff_url":"https://github.com/apollostack/graphql-tag/pull/28.diff","patch_url":"https://github.com/apollostack/graphql-tag/pull/28.patch","issue_url":"https://api.github.com/repos/apollostack/graphql-tag/issues/28","number":28,"state":"open","locked":false,"title":"De-duplicating fragments in document","user":{"login":"jnwng","id":1118534,"avatar_url":"https://avatars.githubusercontent.com/u/1118534?v=3","gravatar_id":"","url":"https://api.github.com/users/jnwng","html_url":"https://github.com/jnwng","followers_url":"https://api.github.com/users/jnwng/followers","following_url":"https://api.github.com/users/jnwng/following{/other_user}","gists_url":"https://api.github.com/users/jnwng/gists{/gist_id}","starred_url":"https://api.github.com/users/jnwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnwng/subscriptions","organizations_url":"https://api.github.com/users/jnwng/orgs","repos_url":"https://api.github.com/users/jnwng/repos","events_url":"https://api.github.com/users/jnwng/events{/privacy}","received_events_url":"https://api.github.com/users/jnwng/received_events","type":"User","site_admin":false},"body":"Per #27, de-duplicating fragments as we're iterating over them to check for fragment name uniqueness.\r\n\r\nThis will result in the expression\r\n```js\r\ngql`query { ...SomeFragment } ${SomeFragment} ${SomeFragment}`\r\n```\r\nonly emitting one of the fragment definitions\r\n```js\r\ngql`query { ...SomeFragment } fragment SomeFragment on SomeResource { someField }`\r\n```","created_at":"2016-12-08T17:25:20Z","updated_at":"2016-12-09T23:05:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35e5c70762ee41691595e55502e1e3d66d71b0eb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28/commits","review_comments_url":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28/comments","review_comment_url":"https://api.github.com/repos/apollostack/graphql-tag/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apollostack/graphql-tag/issues/28/comments","statuses_url":"https://api.github.com/repos/apollostack/graphql-tag/statuses/ae722cddb710240151eeff044606eee946c51c0f","head":{"label":"jnwng:jw/duplicate-fragments","ref":"jw/duplicate-fragments","sha":"ae722cddb710240151eeff044606eee946c51c0f","user":{"login":"jnwng","id":1118534,"avatar_url":"https://avatars.githubusercontent.com/u/1118534?v=3","gravatar_id":"","url":"https://api.github.com/users/jnwng","html_url":"https://github.com/jnwng","followers_url":"https://api.github.com/users/jnwng/followers","following_url":"https://api.github.com/users/jnwng/following{/other_user}","gists_url":"https://api.github.com/users/jnwng/gists{/gist_id}","starred_url":"https://api.github.com/users/jnwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnwng/subscriptions","organizations_url":"https://api.github.com/users/jnwng/orgs","repos_url":"https://api.github.com/users/jnwng/repos","events_url":"https://api.github.com/users/jnwng/events{/privacy}","received_events_url":"https://api.github.com/users/jnwng/received_events","type":"User","site_admin":false},"repo":{"id":75882469,"name":"graphql-tag","full_name":"jnwng/graphql-tag","owner":{"login":"jnwng","id":1118534,"avatar_url":"https://avatars.githubusercontent.com/u/1118534?v=3","gravatar_id":"","url":"https://api.github.com/users/jnwng","html_url":"https://github.com/jnwng","followers_url":"https://api.github.com/users/jnwng/followers","following_url":"https://api.github.com/users/jnwng/following{/other_user}","gists_url":"https://api.github.com/users/jnwng/gists{/gist_id}","starred_url":"https://api.github.com/users/jnwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnwng/subscriptions","organizations_url":"https://api.github.com/users/jnwng/orgs","repos_url":"https://api.github.com/users/jnwng/repos","events_url":"https://api.github.com/users/jnwng/events{/privacy}","received_events_url":"https://api.github.com/users/jnwng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnwng/graphql-tag","description":"A JavaScript template literal tag that parses GraphQL queries","fork":true,"url":"https://api.github.com/repos/jnwng/graphql-tag","forks_url":"https://api.github.com/repos/jnwng/graphql-tag/forks","keys_url":"https://api.github.com/repos/jnwng/graphql-tag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnwng/graphql-tag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnwng/graphql-tag/teams","hooks_url":"https://api.github.com/repos/jnwng/graphql-tag/hooks","issue_events_url":"https://api.github.com/repos/jnwng/graphql-tag/issues/events{/number}","events_url":"https://api.github.com/repos/jnwng/graphql-tag/events","assignees_url":"https://api.github.com/repos/jnwng/graphql-tag/assignees{/user}","branches_url":"https://api.github.com/repos/jnwng/graphql-tag/branches{/branch}","tags_url":"https://api.github.com/repos/jnwng/graphql-tag/tags","blobs_url":"https://api.github.com/repos/jnwng/graphql-tag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnwng/graphql-tag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnwng/graphql-tag/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnwng/graphql-tag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnwng/graphql-tag/statuses/{sha}","languages_url":"https://api.github.com/repos/jnwng/graphql-tag/languages","stargazers_url":"https://api.github.com/repos/jnwng/graphql-tag/stargazers","contributors_url":"https://api.github.com/repos/jnwng/graphql-tag/contributors","subscribers_url":"https://api.github.com/repos/jnwng/graphql-tag/subscribers","subscription_url":"https://api.github.com/repos/jnwng/graphql-tag/subscription","commits_url":"https://api.github.com/repos/jnwng/graphql-tag/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnwng/graphql-tag/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnwng/graphql-tag/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnwng/graphql-tag/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnwng/graphql-tag/contents/{+path}","compare_url":"https://api.github.com/repos/jnwng/graphql-tag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnwng/graphql-tag/merges","archive_url":"https://api.github.com/repos/jnwng/graphql-tag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnwng/graphql-tag/downloads","issues_url":"https://api.github.com/repos/jnwng/graphql-tag/issues{/number}","pulls_url":"https://api.github.com/repos/jnwng/graphql-tag/pulls{/number}","milestones_url":"https://api.github.com/repos/jnwng/graphql-tag/milestones{/number}","notifications_url":"https://api.github.com/repos/jnwng/graphql-tag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnwng/graphql-tag/labels{/name}","releases_url":"https://api.github.com/repos/jnwng/graphql-tag/releases{/id}","deployments_url":"https://api.github.com/repos/jnwng/graphql-tag/deployments","created_at":"2016-12-07T22:54:17Z","updated_at":"2016-12-07T22:54:18Z","pushed_at":"2016-12-09T18:47:13Z","git_url":"git://github.com/jnwng/graphql-tag.git","ssh_url":"git@github.com:jnwng/graphql-tag.git","clone_url":"https://github.com/jnwng/graphql-tag.git","svn_url":"https://github.com/jnwng/graphql-tag","homepage":null,"size":144,"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":"apollostack:master","ref":"master","sha":"31de61a0b2d66ef5b8acf8e3f6afd5f7cb108b27","user":{"login":"apollostack","id":17189275,"avatar_url":"https://avatars.githubusercontent.com/u/17189275?v=3","gravatar_id":"","url":"https://api.github.com/users/apollostack","html_url":"https://github.com/apollostack","followers_url":"https://api.github.com/users/apollostack/followers","following_url":"https://api.github.com/users/apollostack/following{/other_user}","gists_url":"https://api.github.com/users/apollostack/gists{/gist_id}","starred_url":"https://api.github.com/users/apollostack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollostack/subscriptions","organizations_url":"https://api.github.com/users/apollostack/orgs","repos_url":"https://api.github.com/users/apollostack/repos","events_url":"https://api.github.com/users/apollostack/events{/privacy}","received_events_url":"https://api.github.com/users/apollostack/received_events","type":"Organization","site_admin":false},"repo":{"id":61910952,"name":"graphql-tag","full_name":"apollostack/graphql-tag","owner":{"login":"apollostack","id":17189275,"avatar_url":"https://avatars.githubusercontent.com/u/17189275?v=3","gravatar_id":"","url":"https://api.github.com/users/apollostack","html_url":"https://github.com/apollostack","followers_url":"https://api.github.com/users/apollostack/followers","following_url":"https://api.github.com/users/apollostack/following{/other_user}","gists_url":"https://api.github.com/users/apollostack/gists{/gist_id}","starred_url":"https://api.github.com/users/apollostack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollostack/subscriptions","organizations_url":"https://api.github.com/users/apollostack/orgs","repos_url":"https://api.github.com/users/apollostack/repos","events_url":"https://api.github.com/users/apollostack/events{/privacy}","received_events_url":"https://api.github.com/users/apollostack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apollostack/graphql-tag","description":"A JavaScript template literal tag that parses GraphQL queries","fork":false,"url":"https://api.github.com/repos/apollostack/graphql-tag","forks_url":"https://api.github.com/repos/apollostack/graphql-tag/forks","keys_url":"https://api.github.com/repos/apollostack/graphql-tag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apollostack/graphql-tag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apollostack/graphql-tag/teams","hooks_url":"https://api.github.com/repos/apollostack/graphql-tag/hooks","issue_events_url":"https://api.github.com/repos/apollostack/graphql-tag/issues/events{/number}","events_url":"https://api.github.com/repos/apollostack/graphql-tag/events","assignees_url":"https://api.github.com/repos/apollostack/graphql-tag/assignees{/user}","branches_url":"https://api.github.com/repos/apollostack/graphql-tag/branches{/branch}","tags_url":"https://api.github.com/repos/apollostack/graphql-tag/tags","blobs_url":"https://api.github.com/repos/apollostack/graphql-tag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apollostack/graphql-tag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apollostack/graphql-tag/git/refs{/sha}","trees_url":"https://api.github.com/repos/apollostack/graphql-tag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apollostack/graphql-tag/statuses/{sha}","languages_url":"https://api.github.com/repos/apollostack/graphql-tag/languages","stargazers_url":"https://api.github.com/repos/apollostack/graphql-tag/stargazers","contributors_url":"https://api.github.com/repos/apollostack/graphql-tag/contributors","subscribers_url":"https://api.github.com/repos/apollostack/graphql-tag/subscribers","subscription_url":"https://api.github.com/repos/apollostack/graphql-tag/subscription","commits_url":"https://api.github.com/repos/apollostack/graphql-tag/commits{/sha}","git_commits_url":"https://api.github.com/repos/apollostack/graphql-tag/git/commits{/sha}","comments_url":"https://api.github.com/repos/apollostack/graphql-tag/comments{/number}","issue_comment_url":"https://api.github.com/repos/apollostack/graphql-tag/issues/comments{/number}","contents_url":"https://api.github.com/repos/apollostack/graphql-tag/contents/{+path}","compare_url":"https://api.github.com/repos/apollostack/graphql-tag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apollostack/graphql-tag/merges","archive_url":"https://api.github.com/repos/apollostack/graphql-tag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apollostack/graphql-tag/downloads","issues_url":"https://api.github.com/repos/apollostack/graphql-tag/issues{/number}","pulls_url":"https://api.github.com/repos/apollostack/graphql-tag/pulls{/number}","milestones_url":"https://api.github.com/repos/apollostack/graphql-tag/milestones{/number}","notifications_url":"https://api.github.com/repos/apollostack/graphql-tag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apollostack/graphql-tag/labels{/name}","releases_url":"https://api.github.com/repos/apollostack/graphql-tag/releases{/id}","deployments_url":"https://api.github.com/repos/apollostack/graphql-tag/deployments","created_at":"2016-06-24T20:32:33Z","updated_at":"2016-12-09T20:33:28Z","pushed_at":"2016-12-09T18:47:14Z","git_url":"git://github.com/apollostack/graphql-tag.git","ssh_url":"git@github.com:apollostack/graphql-tag.git","clone_url":"https://github.com/apollostack/graphql-tag.git","svn_url":"https://github.com/apollostack/graphql-tag","homepage":null,"size":139,"stargazers_count":99,"watchers_count":99,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":99,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28"},"html":{"href":"https://github.com/apollostack/graphql-tag/pull/28"},"issue":{"href":"https://api.github.com/repos/apollostack/graphql-tag/issues/28"},"comments":{"href":"https://api.github.com/repos/apollostack/graphql-tag/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/apollostack/graphql-tag/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apollostack/graphql-tag/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/apollostack/graphql-tag/statuses/ae722cddb710240151eeff044606eee946c51c0f"}}}}
{"actor":{"display_login":"stubailo"}}