{"action":"created","comment":{"url":"https://api.github.com/repos/dylanaubrey/handl/pulls/comments/175308001","pull_request_review_id":104815277,"id":175308001,"diff_hunk":"@@ -0,0 +1,79 @@\n+import { FieldNode, GraphQLInterfaceType, GraphQLObjectType, GraphQLSchema, InlineFragmentNode } from \"graphql\";\r\n+import { castArray } from \"lodash\";\r\n+import { unwrapInlineFragments } from \"../inline-fragments\";\r\n+import { getKind } from \"../kind\";\r\n+import { getName } from \"../name\";\r\n+import { ParentNode } from \"../types\";\r\n+\r\n+export function addChildField(\r\n+  node: ParentNode,\r\n+  field: FieldNode,\r\n+  schema: GraphQLSchema,\r\n+  resourceID: string,\r\n+): void {\r\n+  if (!node.selectionSet) return;\r\n+  const childFields = node.selectionSet.selections;\r\n+  let added = false;\r\n+\r\n+  for (const childField of childFields) {\r\n+    if (getKind(childField) === \"InlineFragment\") {\r\n+      const inlineFragmentNode = childField as InlineFragmentNode;\r\n+\r\n+      if (inlineFragmentNode.typeCondition) {\r\n+        const name = getName(inlineFragmentNode.typeCondition);\r\n+\r\n+        if (name) {\r\n+          const type = schema.getType(name);\r\n+\r\n+          if (type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType) {\r\n+            const objectOrInterfaceType = type as GraphQLObjectType | GraphQLInterfaceType;\r","path":"src/helpers/parsing/child-fields/index.ts","position":29,"original_position":29,"commit_id":"bbb5b020b6556df32d4c360e20588285e68e1a3b","original_commit_id":"bbb5b020b6556df32d4c360e20588285e68e1a3b","user":{"login":"dylanaubrey","id":17346978,"avatar_url":"https://avatars2.githubusercontent.com/u/17346978?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanaubrey","html_url":"https://github.com/dylanaubrey","followers_url":"https://api.github.com/users/dylanaubrey/followers","following_url":"https://api.github.com/users/dylanaubrey/following{/other_user}","gists_url":"https://api.github.com/users/dylanaubrey/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaubrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaubrey/subscriptions","organizations_url":"https://api.github.com/users/dylanaubrey/orgs","repos_url":"https://api.github.com/users/dylanaubrey/repos","events_url":"https://api.github.com/users/dylanaubrey/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaubrey/received_events","type":"User","site_admin":false},"body":"![MINOR](https://sonarsource.github.io/sonar-github/severity-minor.png 'Severity: MINOR') Remove this unnecessary cast. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonarcloud.io/coding_rules#rule_key=typescript%3AS4325)\n","created_at":"2018-03-18T22:57:18Z","updated_at":"2018-03-18T22:57:18Z","html_url":"https://github.com/dylanaubrey/handl/pull/19#discussion_r175308001","pull_request_url":"https://api.github.com/repos/dylanaubrey/handl/pulls/19","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dylanaubrey/handl/pulls/comments/175308001"},"html":{"href":"https://github.com/dylanaubrey/handl/pull/19#discussion_r175308001"},"pull_request":{"href":"https://api.github.com/repos/dylanaubrey/handl/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/dylanaubrey/handl/pulls/19","id":175778501,"html_url":"https://github.com/dylanaubrey/handl/pull/19","diff_url":"https://github.com/dylanaubrey/handl/pull/19.diff","patch_url":"https://github.com/dylanaubrey/handl/pull/19.patch","issue_url":"https://api.github.com/repos/dylanaubrey/handl/issues/19","number":19,"state":"open","locked":false,"title":"Wip typescript subscription with server","user":{"login":"dylanaubrey","id":17346978,"avatar_url":"https://avatars2.githubusercontent.com/u/17346978?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanaubrey","html_url":"https://github.com/dylanaubrey","followers_url":"https://api.github.com/users/dylanaubrey/followers","following_url":"https://api.github.com/users/dylanaubrey/following{/other_user}","gists_url":"https://api.github.com/users/dylanaubrey/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaubrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaubrey/subscriptions","organizations_url":"https://api.github.com/users/dylanaubrey/orgs","repos_url":"https://api.github.com/users/dylanaubrey/repos","events_url":"https://api.github.com/users/dylanaubrey/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaubrey/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-18T22:52:11Z","updated_at":"2018-03-18T22:57:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e3f49ec149e01dfd00c353fd863f29bdc91f8d6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dylanaubrey/handl/pulls/19/commits","review_comments_url":"https://api.github.com/repos/dylanaubrey/handl/pulls/19/comments","review_comment_url":"https://api.github.com/repos/dylanaubrey/handl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dylanaubrey/handl/issues/19/comments","statuses_url":"https://api.github.com/repos/dylanaubrey/handl/statuses/bbb5b020b6556df32d4c360e20588285e68e1a3b","head":{"label":"dylanaubrey:wip-typescript-subscription-with-server","ref":"wip-typescript-subscription-with-server","sha":"bbb5b020b6556df32d4c360e20588285e68e1a3b","user":{"login":"dylanaubrey","id":17346978,"avatar_url":"https://avatars2.githubusercontent.com/u/17346978?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanaubrey","html_url":"https://github.com/dylanaubrey","followers_url":"https://api.github.com/users/dylanaubrey/followers","following_url":"https://api.github.com/users/dylanaubrey/following{/other_user}","gists_url":"https://api.github.com/users/dylanaubrey/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaubrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaubrey/subscriptions","organizations_url":"https://api.github.com/users/dylanaubrey/orgs","repos_url":"https://api.github.com/users/dylanaubrey/repos","events_url":"https://api.github.com/users/dylanaubrey/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaubrey/received_events","type":"User","site_admin":false},"repo":{"id":100455148,"name":"handl","full_name":"dylanaubrey/handl","owner":{"login":"dylanaubrey","id":17346978,"avatar_url":"https://avatars2.githubusercontent.com/u/17346978?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanaubrey","html_url":"https://github.com/dylanaubrey","followers_url":"https://api.github.com/users/dylanaubrey/followers","following_url":"https://api.github.com/users/dylanaubrey/following{/other_user}","gists_url":"https://api.github.com/users/dylanaubrey/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaubrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaubrey/subscriptions","organizations_url":"https://api.github.com/users/dylanaubrey/orgs","repos_url":"https://api.github.com/users/dylanaubrey/repos","events_url":"https://api.github.com/users/dylanaubrey/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaubrey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dylanaubrey/handl","description":"An isomorphic graphql client and cache.","fork":false,"url":"https://api.github.com/repos/dylanaubrey/handl","forks_url":"https://api.github.com/repos/dylanaubrey/handl/forks","keys_url":"https://api.github.com/repos/dylanaubrey/handl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dylanaubrey/handl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dylanaubrey/handl/teams","hooks_url":"https://api.github.com/repos/dylanaubrey/handl/hooks","issue_events_url":"https://api.github.com/repos/dylanaubrey/handl/issues/events{/number}","events_url":"https://api.github.com/repos/dylanaubrey/handl/events","assignees_url":"https://api.github.com/repos/dylanaubrey/handl/assignees{/user}","branches_url":"https://api.github.com/repos/dylanaubrey/handl/branches{/branch}","tags_url":"https://api.github.com/repos/dylanaubrey/handl/tags","blobs_url":"https://api.github.com/repos/dylanaubrey/handl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dylanaubrey/handl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dylanaubrey/handl/git/refs{/sha}","trees_url":"https://api.github.com/repos/dylanaubrey/handl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dylanaubrey/handl/statuses/{sha}","languages_url":"https://api.github.com/repos/dylanaubrey/handl/languages","stargazers_url":"https://api.github.com/repos/dylanaubrey/handl/stargazers","contributors_url":"https://api.github.com/repos/dylanaubrey/handl/contributors","subscribers_url":"https://api.github.com/repos/dylanaubrey/handl/subscribers","subscription_url":"https://api.github.com/repos/dylanaubrey/handl/subscription","commits_url":"https://api.github.com/repos/dylanaubrey/handl/commits{/sha}","git_commits_url":"https://api.github.com/repos/dylanaubrey/handl/git/commits{/sha}","comments_url":"https://api.github.com/repos/dylanaubrey/handl/comments{/number}","issue_comment_url":"https://api.github.com/repos/dylanaubrey/handl/issues/comments{/number}","contents_url":"https://api.github.com/repos/dylanaubrey/handl/contents/{+path}","compare_url":"https://api.github.com/repos/dylanaubrey/handl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dylanaubrey/handl/merges","archive_url":"https://api.github.com/repos/dylanaubrey/handl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dylanaubrey/handl/downloads","issues_url":"https://api.github.com/repos/dylanaubrey/handl/issues{/number}","pulls_url":"https://api.github.com/repos/dylanaubrey/handl/pulls{/number}","milestones_url":"https://api.github.com/repos/dylanaubrey/handl/milestones{/number}","notifications_url":"https://api.github.com/repos/dylanaubrey/handl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dylanaubrey/handl/labels{/name}","releases_url":"https://api.github.com/repos/dylanaubrey/handl/releases{/id}","deployments_url":"https://api.github.com/repos/dylanaubrey/handl/deployments","created_at":"2017-08-16T06:23:30Z","updated_at":"2017-11-07T01:53:24Z","pushed_at":"2018-03-18T22:52:11Z","git_url":"git://github.com/dylanaubrey/handl.git","ssh_url":"git@github.com:dylanaubrey/handl.git","clone_url":"https://github.com/dylanaubrey/handl.git","svn_url":"https://github.com/dylanaubrey/handl","homepage":null,"size":1103,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"dylanaubrey:master","ref":"master","sha":"c5b2c1c040826b350e69e7405025f657bde66413","user":{"login":"dylanaubrey","id":17346978,"avatar_url":"https://avatars2.githubusercontent.com/u/17346978?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanaubrey","html_url":"https://github.com/dylanaubrey","followers_url":"https://api.github.com/users/dylanaubrey/followers","following_url":"https://api.github.com/users/dylanaubrey/following{/other_user}","gists_url":"https://api.github.com/users/dylanaubrey/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaubrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaubrey/subscriptions","organizations_url":"https://api.github.com/users/dylanaubrey/orgs","repos_url":"https://api.github.com/users/dylanaubrey/repos","events_url":"https://api.github.com/users/dylanaubrey/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaubrey/received_events","type":"User","site_admin":false},"repo":{"id":100455148,"name":"handl","full_name":"dylanaubrey/handl","owner":{"login":"dylanaubrey","id":17346978,"avatar_url":"https://avatars2.githubusercontent.com/u/17346978?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanaubrey","html_url":"https://github.com/dylanaubrey","followers_url":"https://api.github.com/users/dylanaubrey/followers","following_url":"https://api.github.com/users/dylanaubrey/following{/other_user}","gists_url":"https://api.github.com/users/dylanaubrey/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaubrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaubrey/subscriptions","organizations_url":"https://api.github.com/users/dylanaubrey/orgs","repos_url":"https://api.github.com/users/dylanaubrey/repos","events_url":"https://api.github.com/users/dylanaubrey/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaubrey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dylanaubrey/handl","description":"An isomorphic graphql client and cache.","fork":false,"url":"https://api.github.com/repos/dylanaubrey/handl","forks_url":"https://api.github.com/repos/dylanaubrey/handl/forks","keys_url":"https://api.github.com/repos/dylanaubrey/handl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dylanaubrey/handl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dylanaubrey/handl/teams","hooks_url":"https://api.github.com/repos/dylanaubrey/handl/hooks","issue_events_url":"https://api.github.com/repos/dylanaubrey/handl/issues/events{/number}","events_url":"https://api.github.com/repos/dylanaubrey/handl/events","assignees_url":"https://api.github.com/repos/dylanaubrey/handl/assignees{/user}","branches_url":"https://api.github.com/repos/dylanaubrey/handl/branches{/branch}","tags_url":"https://api.github.com/repos/dylanaubrey/handl/tags","blobs_url":"https://api.github.com/repos/dylanaubrey/handl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dylanaubrey/handl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dylanaubrey/handl/git/refs{/sha}","trees_url":"https://api.github.com/repos/dylanaubrey/handl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dylanaubrey/handl/statuses/{sha}","languages_url":"https://api.github.com/repos/dylanaubrey/handl/languages","stargazers_url":"https://api.github.com/repos/dylanaubrey/handl/stargazers","contributors_url":"https://api.github.com/repos/dylanaubrey/handl/contributors","subscribers_url":"https://api.github.com/repos/dylanaubrey/handl/subscribers","subscription_url":"https://api.github.com/repos/dylanaubrey/handl/subscription","commits_url":"https://api.github.com/repos/dylanaubrey/handl/commits{/sha}","git_commits_url":"https://api.github.com/repos/dylanaubrey/handl/git/commits{/sha}","comments_url":"https://api.github.com/repos/dylanaubrey/handl/comments{/number}","issue_comment_url":"https://api.github.com/repos/dylanaubrey/handl/issues/comments{/number}","contents_url":"https://api.github.com/repos/dylanaubrey/handl/contents/{+path}","compare_url":"https://api.github.com/repos/dylanaubrey/handl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dylanaubrey/handl/merges","archive_url":"https://api.github.com/repos/dylanaubrey/handl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dylanaubrey/handl/downloads","issues_url":"https://api.github.com/repos/dylanaubrey/handl/issues{/number}","pulls_url":"https://api.github.com/repos/dylanaubrey/handl/pulls{/number}","milestones_url":"https://api.github.com/repos/dylanaubrey/handl/milestones{/number}","notifications_url":"https://api.github.com/repos/dylanaubrey/handl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dylanaubrey/handl/labels{/name}","releases_url":"https://api.github.com/repos/dylanaubrey/handl/releases{/id}","deployments_url":"https://api.github.com/repos/dylanaubrey/handl/deployments","created_at":"2017-08-16T06:23:30Z","updated_at":"2017-11-07T01:53:24Z","pushed_at":"2018-03-18T22:52:11Z","git_url":"git://github.com/dylanaubrey/handl.git","ssh_url":"git@github.com:dylanaubrey/handl.git","clone_url":"https://github.com/dylanaubrey/handl.git","svn_url":"https://github.com/dylanaubrey/handl","homepage":null,"size":1103,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dylanaubrey/handl/pulls/19"},"html":{"href":"https://github.com/dylanaubrey/handl/pull/19"},"issue":{"href":"https://api.github.com/repos/dylanaubrey/handl/issues/19"},"comments":{"href":"https://api.github.com/repos/dylanaubrey/handl/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/dylanaubrey/handl/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/dylanaubrey/handl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dylanaubrey/handl/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/dylanaubrey/handl/statuses/bbb5b020b6556df32d4c360e20588285e68e1a3b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"dylanaubrey"}}