{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/comments/133430521","pull_request_review_id":56608577,"id":133430521,"diff_hunk":"@@ -38,20 +38,42 @@ type QuestionPage implements Page {\n     sectionId: Int!\n }\n \n-type Answer {\n-    id: Int\n+interface Answer {\n+    id: Int!\n+    description: String\n+    guidance: String\n+    qCode: String\n+    label: String\n+    type: AnswerType!\n+    mandatory: Boolean\n+    questionPageId: Int\n+}\n+\n+type BasicAnswer implements Answer {\n+    id: Int!\n     description: String\n     guidance: String\n     qCode: String\n     label: String\n-    type: AnswerType\n+    type: AnswerType!\n+    mandatory: Boolean\n+    questionPageId: Int","path":"index.js","position":null,"original_position":26,"commit_id":"423fde8f02ac0597c040abd54a8cec10274f54d2","original_commit_id":"6587763ec12e22ecc1a9c70a7a089dab911b31db","user":{"login":"samiwel","id":4097796,"avatar_url":"https://avatars1.githubusercontent.com/u/4097796?v=4","gravatar_id":"","url":"https://api.github.com/users/samiwel","html_url":"https://github.com/samiwel","followers_url":"https://api.github.com/users/samiwel/followers","following_url":"https://api.github.com/users/samiwel/following{/other_user}","gists_url":"https://api.github.com/users/samiwel/gists{/gist_id}","starred_url":"https://api.github.com/users/samiwel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samiwel/subscriptions","organizations_url":"https://api.github.com/users/samiwel/orgs","repos_url":"https://api.github.com/users/samiwel/repos","events_url":"https://api.github.com/users/samiwel/events{/privacy}","received_events_url":"https://api.github.com/users/samiwel/received_events","type":"User","site_admin":false},"body":"I've made these fields mandatory also.","created_at":"2017-08-16T12:09:48Z","updated_at":"2017-08-16T12:09:48Z","html_url":"https://github.com/ONSdigital/eq-author-graphql-schema/pull/3#discussion_r133430521","pull_request_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/comments/133430521"},"html":{"href":"https://github.com/ONSdigital/eq-author-graphql-schema/pull/3#discussion_r133430521"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3","id":135555368,"html_url":"https://github.com/ONSdigital/eq-author-graphql-schema/pull/3","diff_url":"https://github.com/ONSdigital/eq-author-graphql-schema/pull/3.diff","patch_url":"https://github.com/ONSdigital/eq-author-graphql-schema/pull/3.patch","issue_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/3","number":3,"state":"open","locked":false,"title":"Introduce interface and concrete types for answers.","user":{"login":"samiwel","id":4097796,"avatar_url":"https://avatars1.githubusercontent.com/u/4097796?v=4","gravatar_id":"","url":"https://api.github.com/users/samiwel","html_url":"https://github.com/samiwel","followers_url":"https://api.github.com/users/samiwel/followers","following_url":"https://api.github.com/users/samiwel/following{/other_user}","gists_url":"https://api.github.com/users/samiwel/gists{/gist_id}","starred_url":"https://api.github.com/users/samiwel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samiwel/subscriptions","organizations_url":"https://api.github.com/users/samiwel/orgs","repos_url":"https://api.github.com/users/samiwel/repos","events_url":"https://api.github.com/users/samiwel/events{/privacy}","received_events_url":"https://api.github.com/users/samiwel/received_events","type":"User","site_admin":false},"body":"### What is the context of this PR?\r\nThis PR builds on the previous change of introducing Option type for Answers by further restricting Options to MultipleChoiceAnswers.\r\nThat is, only Radio and Checkbox Answers should currently support returning Options. This PR enforces this in the Schema.\r\nA separate PR will be raised to change the resolvers in the API.\r\n\r\n### How to review \r\nThe GraphQL schema should be correct and work with the updated API resolvers.\r\n","created_at":"2017-08-14T09:06:14Z","updated_at":"2017-08-16T12:09:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65517445bc8884cc5ae928e98e35b5f97112a5f1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/3/comments","statuses_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/statuses/423fde8f02ac0597c040abd54a8cec10274f54d2","head":{"label":"ONSdigital:157/add-option-to-api","ref":"157/add-option-to-api","sha":"423fde8f02ac0597c040abd54a8cec10274f54d2","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":97593338,"name":"eq-author-graphql-schema","full_name":"ONSdigital/eq-author-graphql-schema","owner":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/eq-author-graphql-schema","description":"The GraphQL schema for the eq-author application.","fork":false,"url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema","forks_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/forks","keys_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/teams","hooks_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/events","assignees_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/tags","blobs_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/subscription","commits_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/merges","archive_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/downloads","issues_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/deployments","created_at":"2017-07-18T12:05:42Z","updated_at":"2017-07-19T12:08:39Z","pushed_at":"2017-08-16T12:09:12Z","git_url":"git://github.com/ONSdigital/eq-author-graphql-schema.git","ssh_url":"git@github.com:ONSdigital/eq-author-graphql-schema.git","clone_url":"https://github.com/ONSdigital/eq-author-graphql-schema.git","svn_url":"https://github.com/ONSdigital/eq-author-graphql-schema","homepage":null,"size":16,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"938cef6fb660834416cb84236410351344c82b12","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":97593338,"name":"eq-author-graphql-schema","full_name":"ONSdigital/eq-author-graphql-schema","owner":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/eq-author-graphql-schema","description":"The GraphQL schema for the eq-author application.","fork":false,"url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema","forks_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/forks","keys_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/teams","hooks_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/events","assignees_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/tags","blobs_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/subscription","commits_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/merges","archive_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/downloads","issues_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/deployments","created_at":"2017-07-18T12:05:42Z","updated_at":"2017-07-19T12:08:39Z","pushed_at":"2017-08-16T12:09:12Z","git_url":"git://github.com/ONSdigital/eq-author-graphql-schema.git","ssh_url":"git@github.com:ONSdigital/eq-author-graphql-schema.git","clone_url":"https://github.com/ONSdigital/eq-author-graphql-schema.git","svn_url":"https://github.com/ONSdigital/eq-author-graphql-schema","homepage":null,"size":16,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3"},"html":{"href":"https://github.com/ONSdigital/eq-author-graphql-schema/pull/3"},"issue":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/3"},"comments":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/eq-author-graphql-schema/statuses/423fde8f02ac0597c040abd54a8cec10274f54d2"}}}}
{"actor":{"display_login":"samiwel"}}