{"action":"opened","number":143,"pull_request":{"url":"https://api.github.com/repos/coursera/naptime/pulls/143","id":93907090,"html_url":"https://github.com/coursera/naptime/pull/143","diff_url":"https://github.com/coursera/naptime/pull/143.diff","patch_url":"https://github.com/coursera/naptime/pull/143.patch","issue_url":"https://api.github.com/repos/coursera/naptime/issues/143","number":143,"state":"open","locked":false,"title":"Fix bugs with generating and resolving union types","user":{"login":"bryan-coursera","id":4421444,"avatar_url":"https://avatars.githubusercontent.com/u/4421444?v=3","gravatar_id":"","url":"https://api.github.com/users/bryan-coursera","html_url":"https://github.com/bryan-coursera","followers_url":"https://api.github.com/users/bryan-coursera/followers","following_url":"https://api.github.com/users/bryan-coursera/following{/other_user}","gists_url":"https://api.github.com/users/bryan-coursera/gists{/gist_id}","starred_url":"https://api.github.com/users/bryan-coursera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryan-coursera/subscriptions","organizations_url":"https://api.github.com/users/bryan-coursera/orgs","repos_url":"https://api.github.com/users/bryan-coursera/repos","events_url":"https://api.github.com/users/bryan-coursera/events{/privacy}","received_events_url":"https://api.github.com/users/bryan-coursera/received_events","type":"User","site_admin":false},"body":"This fixes two bugs with union types, both around the way that names are converted from a courier name (i.e. org.coursera.UnionMember) to a GraphQL compatible name (org_coursera_UnionMember).\r\n\r\nThe first bug was that we could not correctly resolve the ObjectType to parse into based on the field names, because we were comparing strings of the two different formats, which were never matching. This wasn't caught when we were working with primitive types, because \"int\" didn't have any field name conversion issues.\r\n\r\nThe second bug was around how we were parsing the data out of the record field, which again was due to a mismatch in the two names.\r\n\r\nThese issues should be fixed now, and I added a unit test to check against more complex union types.\r\n\r\nPTAL @yifan-coursera and cc @jnwng  ","created_at":"2016-11-16T06:09:46Z","updated_at":"2016-11-16T06:09:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coursera/naptime/pulls/143/commits","review_comments_url":"https://api.github.com/repos/coursera/naptime/pulls/143/comments","review_comment_url":"https://api.github.com/repos/coursera/naptime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coursera/naptime/issues/143/comments","statuses_url":"https://api.github.com/repos/coursera/naptime/statuses/633385d1070ed5361951ce34608d01379d3cbadc","head":{"label":"bryan-coursera:fix-union-bugs","ref":"fix-union-bugs","sha":"633385d1070ed5361951ce34608d01379d3cbadc","user":{"login":"bryan-coursera","id":4421444,"avatar_url":"https://avatars.githubusercontent.com/u/4421444?v=3","gravatar_id":"","url":"https://api.github.com/users/bryan-coursera","html_url":"https://github.com/bryan-coursera","followers_url":"https://api.github.com/users/bryan-coursera/followers","following_url":"https://api.github.com/users/bryan-coursera/following{/other_user}","gists_url":"https://api.github.com/users/bryan-coursera/gists{/gist_id}","starred_url":"https://api.github.com/users/bryan-coursera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryan-coursera/subscriptions","organizations_url":"https://api.github.com/users/bryan-coursera/orgs","repos_url":"https://api.github.com/users/bryan-coursera/repos","events_url":"https://api.github.com/users/bryan-coursera/events{/privacy}","received_events_url":"https://api.github.com/users/bryan-coursera/received_events","type":"User","site_admin":false},"repo":{"id":63643519,"name":"naptime","full_name":"bryan-coursera/naptime","owner":{"login":"bryan-coursera","id":4421444,"avatar_url":"https://avatars.githubusercontent.com/u/4421444?v=3","gravatar_id":"","url":"https://api.github.com/users/bryan-coursera","html_url":"https://github.com/bryan-coursera","followers_url":"https://api.github.com/users/bryan-coursera/followers","following_url":"https://api.github.com/users/bryan-coursera/following{/other_user}","gists_url":"https://api.github.com/users/bryan-coursera/gists{/gist_id}","starred_url":"https://api.github.com/users/bryan-coursera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryan-coursera/subscriptions","organizations_url":"https://api.github.com/users/bryan-coursera/orgs","repos_url":"https://api.github.com/users/bryan-coursera/repos","events_url":"https://api.github.com/users/bryan-coursera/events{/privacy}","received_events_url":"https://api.github.com/users/bryan-coursera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bryan-coursera/naptime","description":"Making REST APIs so easy, you can build them in your sleep!","fork":true,"url":"https://api.github.com/repos/bryan-coursera/naptime","forks_url":"https://api.github.com/repos/bryan-coursera/naptime/forks","keys_url":"https://api.github.com/repos/bryan-coursera/naptime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bryan-coursera/naptime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bryan-coursera/naptime/teams","hooks_url":"https://api.github.com/repos/bryan-coursera/naptime/hooks","issue_events_url":"https://api.github.com/repos/bryan-coursera/naptime/issues/events{/number}","events_url":"https://api.github.com/repos/bryan-coursera/naptime/events","assignees_url":"https://api.github.com/repos/bryan-coursera/naptime/assignees{/user}","branches_url":"https://api.github.com/repos/bryan-coursera/naptime/branches{/branch}","tags_url":"https://api.github.com/repos/bryan-coursera/naptime/tags","blobs_url":"https://api.github.com/repos/bryan-coursera/naptime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bryan-coursera/naptime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bryan-coursera/naptime/git/refs{/sha}","trees_url":"https://api.github.com/repos/bryan-coursera/naptime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bryan-coursera/naptime/statuses/{sha}","languages_url":"https://api.github.com/repos/bryan-coursera/naptime/languages","stargazers_url":"https://api.github.com/repos/bryan-coursera/naptime/stargazers","contributors_url":"https://api.github.com/repos/bryan-coursera/naptime/contributors","subscribers_url":"https://api.github.com/repos/bryan-coursera/naptime/subscribers","subscription_url":"https://api.github.com/repos/bryan-coursera/naptime/subscription","commits_url":"https://api.github.com/repos/bryan-coursera/naptime/commits{/sha}","git_commits_url":"https://api.github.com/repos/bryan-coursera/naptime/git/commits{/sha}","comments_url":"https://api.github.com/repos/bryan-coursera/naptime/comments{/number}","issue_comment_url":"https://api.github.com/repos/bryan-coursera/naptime/issues/comments{/number}","contents_url":"https://api.github.com/repos/bryan-coursera/naptime/contents/{+path}","compare_url":"https://api.github.com/repos/bryan-coursera/naptime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bryan-coursera/naptime/merges","archive_url":"https://api.github.com/repos/bryan-coursera/naptime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bryan-coursera/naptime/downloads","issues_url":"https://api.github.com/repos/bryan-coursera/naptime/issues{/number}","pulls_url":"https://api.github.com/repos/bryan-coursera/naptime/pulls{/number}","milestones_url":"https://api.github.com/repos/bryan-coursera/naptime/milestones{/number}","notifications_url":"https://api.github.com/repos/bryan-coursera/naptime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bryan-coursera/naptime/labels{/name}","releases_url":"https://api.github.com/repos/bryan-coursera/naptime/releases{/id}","deployments_url":"https://api.github.com/repos/bryan-coursera/naptime/deployments","created_at":"2016-07-18T23:16:31Z","updated_at":"2016-07-18T23:16:32Z","pushed_at":"2016-11-16T06:06:29Z","git_url":"git://github.com/bryan-coursera/naptime.git","ssh_url":"git@github.com:bryan-coursera/naptime.git","clone_url":"https://github.com/bryan-coursera/naptime.git","svn_url":"https://github.com/bryan-coursera/naptime","homepage":"","size":914,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"coursera:master","ref":"master","sha":"43a45f5d6d69252db2871e25a46a8bb0d0dc3374","user":{"login":"coursera","id":1744549,"avatar_url":"https://avatars.githubusercontent.com/u/1744549?v=3","gravatar_id":"","url":"https://api.github.com/users/coursera","html_url":"https://github.com/coursera","followers_url":"https://api.github.com/users/coursera/followers","following_url":"https://api.github.com/users/coursera/following{/other_user}","gists_url":"https://api.github.com/users/coursera/gists{/gist_id}","starred_url":"https://api.github.com/users/coursera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coursera/subscriptions","organizations_url":"https://api.github.com/users/coursera/orgs","repos_url":"https://api.github.com/users/coursera/repos","events_url":"https://api.github.com/users/coursera/events{/privacy}","received_events_url":"https://api.github.com/users/coursera/received_events","type":"Organization","site_admin":false},"repo":{"id":57407978,"name":"naptime","full_name":"coursera/naptime","owner":{"login":"coursera","id":1744549,"avatar_url":"https://avatars.githubusercontent.com/u/1744549?v=3","gravatar_id":"","url":"https://api.github.com/users/coursera","html_url":"https://github.com/coursera","followers_url":"https://api.github.com/users/coursera/followers","following_url":"https://api.github.com/users/coursera/following{/other_user}","gists_url":"https://api.github.com/users/coursera/gists{/gist_id}","starred_url":"https://api.github.com/users/coursera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coursera/subscriptions","organizations_url":"https://api.github.com/users/coursera/orgs","repos_url":"https://api.github.com/users/coursera/repos","events_url":"https://api.github.com/users/coursera/events{/privacy}","received_events_url":"https://api.github.com/users/coursera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coursera/naptime","description":"Making REST APIs so easy, you can build them in your sleep!","fork":false,"url":"https://api.github.com/repos/coursera/naptime","forks_url":"https://api.github.com/repos/coursera/naptime/forks","keys_url":"https://api.github.com/repos/coursera/naptime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coursera/naptime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coursera/naptime/teams","hooks_url":"https://api.github.com/repos/coursera/naptime/hooks","issue_events_url":"https://api.github.com/repos/coursera/naptime/issues/events{/number}","events_url":"https://api.github.com/repos/coursera/naptime/events","assignees_url":"https://api.github.com/repos/coursera/naptime/assignees{/user}","branches_url":"https://api.github.com/repos/coursera/naptime/branches{/branch}","tags_url":"https://api.github.com/repos/coursera/naptime/tags","blobs_url":"https://api.github.com/repos/coursera/naptime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coursera/naptime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coursera/naptime/git/refs{/sha}","trees_url":"https://api.github.com/repos/coursera/naptime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coursera/naptime/statuses/{sha}","languages_url":"https://api.github.com/repos/coursera/naptime/languages","stargazers_url":"https://api.github.com/repos/coursera/naptime/stargazers","contributors_url":"https://api.github.com/repos/coursera/naptime/contributors","subscribers_url":"https://api.github.com/repos/coursera/naptime/subscribers","subscription_url":"https://api.github.com/repos/coursera/naptime/subscription","commits_url":"https://api.github.com/repos/coursera/naptime/commits{/sha}","git_commits_url":"https://api.github.com/repos/coursera/naptime/git/commits{/sha}","comments_url":"https://api.github.com/repos/coursera/naptime/comments{/number}","issue_comment_url":"https://api.github.com/repos/coursera/naptime/issues/comments{/number}","contents_url":"https://api.github.com/repos/coursera/naptime/contents/{+path}","compare_url":"https://api.github.com/repos/coursera/naptime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coursera/naptime/merges","archive_url":"https://api.github.com/repos/coursera/naptime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coursera/naptime/downloads","issues_url":"https://api.github.com/repos/coursera/naptime/issues{/number}","pulls_url":"https://api.github.com/repos/coursera/naptime/pulls{/number}","milestones_url":"https://api.github.com/repos/coursera/naptime/milestones{/number}","notifications_url":"https://api.github.com/repos/coursera/naptime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coursera/naptime/labels{/name}","releases_url":"https://api.github.com/repos/coursera/naptime/releases{/id}","deployments_url":"https://api.github.com/repos/coursera/naptime/deployments","created_at":"2016-04-29T19:27:17Z","updated_at":"2016-11-15T04:34:56Z","pushed_at":"2016-11-16T06:09:46Z","git_url":"git://github.com/coursera/naptime.git","ssh_url":"git@github.com:coursera/naptime.git","clone_url":"https://github.com/coursera/naptime.git","svn_url":"https://github.com/coursera/naptime","homepage":"","size":1079,"stargazers_count":37,"watchers_count":37,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":10,"forks":7,"open_issues":10,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coursera/naptime/pulls/143"},"html":{"href":"https://github.com/coursera/naptime/pull/143"},"issue":{"href":"https://api.github.com/repos/coursera/naptime/issues/143"},"comments":{"href":"https://api.github.com/repos/coursera/naptime/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/coursera/naptime/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/coursera/naptime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coursera/naptime/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/coursera/naptime/statuses/633385d1070ed5361951ce34608d01379d3cbadc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":79,"deletions":4,"changed_files":7}}
{"actor":{"display_login":"bryan-coursera"}}