{"action":"created","comment":{"url":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments/200996137","pull_request_review_id":135409629,"id":200996137,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDk5NjEzNw==","diff_hunk":"@@ -183,3 +249,25 @@ export const registerServer = () => {\n     'Please use server.applyMiddleware instead of registerServer. This warning will be removed in the next release',\n   );\n };\n+\n+// XXX It would be great if there was a way to go through all properties of the parent to the Partial\n+// to perform this check, but that does not exist yet, so we will need to check each one of the properties\n+// of GuiOptions to see if there is anything set.\n+function isPartialGui(gui: NonDynamicGuiConfig): gui is Partial<GuiOptions> {\n+  return (\n+    (<Partial<GuiOptions>>gui).playgroundThemeOptions !== undefined ||\n+    (<Partial<GuiOptions>>gui).playgroundTabOptions !== undefined\n+  );\n+}\n+\n+// This is necessary to make TypeScript happy, since it cannot smart-cast types via conditional logic\n+function isBoolean(gui: NonDynamicGuiConfig): gui is boolean {\n+  return typeof gui === typeof true;","path":"packages/apollo-server-express/src/ApolloServer.ts","position":125,"original_position":125,"commit_id":"e54f9be690d0c6b8e4cbe3c6597d29c057bbde14","original_commit_id":"e54f9be690d0c6b8e4cbe3c6597d29c057bbde14","user":{"login":"zionts","id":6365997,"node_id":"MDQ6VXNlcjYzNjU5OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/6365997?v=4","gravatar_id":"","url":"https://api.github.com/users/zionts","html_url":"https://github.com/zionts","followers_url":"https://api.github.com/users/zionts/followers","following_url":"https://api.github.com/users/zionts/following{/other_user}","gists_url":"https://api.github.com/users/zionts/gists{/gist_id}","starred_url":"https://api.github.com/users/zionts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zionts/subscriptions","organizations_url":"https://api.github.com/users/zionts/orgs","repos_url":"https://api.github.com/users/zionts/repos","events_url":"https://api.github.com/users/zionts/events{/privacy}","received_events_url":"https://api.github.com/users/zionts/received_events","type":"User","site_admin":false},"body":"I preferred doing it this way to leave out the hard-coded string. Is there a reason it's preferred to leave the hard-coded string instead of comparing it to a type you know?","created_at":"2018-07-09T13:12:15Z","updated_at":"2018-07-09T13:12:15Z","html_url":"https://github.com/apollographql/apollo-server/pull/1297#discussion_r200996137","pull_request_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments/200996137"},"html":{"href":"https://github.com/apollographql/apollo-server/pull/1297#discussion_r200996137"},"pull_request":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297"}},"in_reply_to_id":200888490},"pull_request":{"url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297","id":199327849,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MzI3ODQ5","html_url":"https://github.com/apollographql/apollo-server/pull/1297","diff_url":"https://github.com/apollographql/apollo-server/pull/1297.diff","patch_url":"https://github.com/apollographql/apollo-server/pull/1297.patch","issue_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1297","number":1297,"state":"open","locked":false,"title":"Add a wider diversity of `gui` options","user":{"login":"zionts","id":6365997,"node_id":"MDQ6VXNlcjYzNjU5OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/6365997?v=4","gravatar_id":"","url":"https://api.github.com/users/zionts","html_url":"https://github.com/zionts","followers_url":"https://api.github.com/users/zionts/followers","following_url":"https://api.github.com/users/zionts/following{/other_user}","gists_url":"https://api.github.com/users/zionts/gists{/gist_id}","starred_url":"https://api.github.com/users/zionts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zionts/subscriptions","organizations_url":"https://api.github.com/users/zionts/orgs","repos_url":"https://api.github.com/users/zionts/repos","events_url":"https://api.github.com/users/zionts/events{/privacy}","received_events_url":"https://api.github.com/users/zionts/received_events","type":"User","site_admin":false},"body":"Although I know we want to remain less tied to the GraphQL Playground\r\nGUI options, we definitely want to support a wider variety of options to\r\nbe passed in. This adds support for specifying partial options either\r\nstatically or dynamically for the gui, which can be extended to allow\r\nfor a wider array of guis than only GraphQL playground.\r\n\r\n<!--\r\n  Thanks for filing a pull request on GraphQL Server!\r\n\r\n  Please look at the following checklist to ensure that your PR\r\n  can be accepted quickly:\r\n-->\r\n\r\nTODO:\r\n\r\n* [ ] Update CHANGELOG.md with your change (include reference to issue & this PR)\r\n* [x] Make sure all of the significant new logic is covered by tests\r\n* [ ] Rebase your changes on master so that they can be merged easily\r\n* [x] Make sure all tests and linter rules pass\r\n\r\n<!--**Pull Request Labels**\r\n\r\nWhile not necessary, you can help organize our pull requests by labeling this issue when you open it.  To add a label automatically, simply [x] mark the appropriate box below:\r\n\r\n- [ ] feature\r\n- [ ] blocking\r\n- [ ] docs\r\n\r\nTo add a label not listed above, simply place `/label another-label-name` on a line by itself.\r\n-->","created_at":"2018-07-04T21:58:02Z","updated_at":"2018-07-09T13:12:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6176ae710de3bcdf0a918b8268537a448278829","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297/commits","review_comments_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297/comments","review_comment_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1297/comments","statuses_url":"https://api.github.com/repos/apollographql/apollo-server/statuses/e54f9be690d0c6b8e4cbe3c6597d29c057bbde14","head":{"label":"apollographql:adam/gui-options","ref":"adam/gui-options","sha":"e54f9be690d0c6b8e4cbe3c6597d29c057bbde14","user":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"repo":{"id":56760633,"node_id":"MDEwOlJlcG9zaXRvcnk1Njc2MDYzMw==","name":"apollo-server","full_name":"apollographql/apollo-server","owner":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apollographql/apollo-server","description":":earth_africa: GraphQL server for Express, Connect, Hapi, Koa and more","fork":false,"url":"https://api.github.com/repos/apollographql/apollo-server","forks_url":"https://api.github.com/repos/apollographql/apollo-server/forks","keys_url":"https://api.github.com/repos/apollographql/apollo-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apollographql/apollo-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apollographql/apollo-server/teams","hooks_url":"https://api.github.com/repos/apollographql/apollo-server/hooks","issue_events_url":"https://api.github.com/repos/apollographql/apollo-server/issues/events{/number}","events_url":"https://api.github.com/repos/apollographql/apollo-server/events","assignees_url":"https://api.github.com/repos/apollographql/apollo-server/assignees{/user}","branches_url":"https://api.github.com/repos/apollographql/apollo-server/branches{/branch}","tags_url":"https://api.github.com/repos/apollographql/apollo-server/tags","blobs_url":"https://api.github.com/repos/apollographql/apollo-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apollographql/apollo-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apollographql/apollo-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apollographql/apollo-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apollographql/apollo-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apollographql/apollo-server/languages","stargazers_url":"https://api.github.com/repos/apollographql/apollo-server/stargazers","contributors_url":"https://api.github.com/repos/apollographql/apollo-server/contributors","subscribers_url":"https://api.github.com/repos/apollographql/apollo-server/subscribers","subscription_url":"https://api.github.com/repos/apollographql/apollo-server/subscription","commits_url":"https://api.github.com/repos/apollographql/apollo-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apollographql/apollo-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apollographql/apollo-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apollographql/apollo-server/contents/{+path}","compare_url":"https://api.github.com/repos/apollographql/apollo-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apollographql/apollo-server/merges","archive_url":"https://api.github.com/repos/apollographql/apollo-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apollographql/apollo-server/downloads","issues_url":"https://api.github.com/repos/apollographql/apollo-server/issues{/number}","pulls_url":"https://api.github.com/repos/apollographql/apollo-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apollographql/apollo-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apollographql/apollo-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apollographql/apollo-server/labels{/name}","releases_url":"https://api.github.com/repos/apollographql/apollo-server/releases{/id}","deployments_url":"https://api.github.com/repos/apollographql/apollo-server/deployments","created_at":"2016-04-21T09:26:01Z","updated_at":"2018-07-09T12:33:22Z","pushed_at":"2018-07-09T12:56:02Z","git_url":"git://github.com/apollographql/apollo-server.git","ssh_url":"git@github.com:apollographql/apollo-server.git","clone_url":"https://github.com/apollographql/apollo-server.git","svn_url":"https://github.com/apollographql/apollo-server","homepage":"https://www.apollographql.com/docs/apollo-server/","size":4734,"stargazers_count":4463,"watchers_count":4463,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":450,"mirror_url":null,"archived":false,"open_issues_count":149,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":450,"open_issues":149,"watchers":4463,"default_branch":"master"}},"base":{"label":"apollographql:version-2","ref":"version-2","sha":"02d31559da137f4669ace29fb4c71e52d9b596ee","user":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"repo":{"id":56760633,"node_id":"MDEwOlJlcG9zaXRvcnk1Njc2MDYzMw==","name":"apollo-server","full_name":"apollographql/apollo-server","owner":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apollographql/apollo-server","description":":earth_africa: GraphQL server for Express, Connect, Hapi, Koa and more","fork":false,"url":"https://api.github.com/repos/apollographql/apollo-server","forks_url":"https://api.github.com/repos/apollographql/apollo-server/forks","keys_url":"https://api.github.com/repos/apollographql/apollo-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apollographql/apollo-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apollographql/apollo-server/teams","hooks_url":"https://api.github.com/repos/apollographql/apollo-server/hooks","issue_events_url":"https://api.github.com/repos/apollographql/apollo-server/issues/events{/number}","events_url":"https://api.github.com/repos/apollographql/apollo-server/events","assignees_url":"https://api.github.com/repos/apollographql/apollo-server/assignees{/user}","branches_url":"https://api.github.com/repos/apollographql/apollo-server/branches{/branch}","tags_url":"https://api.github.com/repos/apollographql/apollo-server/tags","blobs_url":"https://api.github.com/repos/apollographql/apollo-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apollographql/apollo-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apollographql/apollo-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apollographql/apollo-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apollographql/apollo-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apollographql/apollo-server/languages","stargazers_url":"https://api.github.com/repos/apollographql/apollo-server/stargazers","contributors_url":"https://api.github.com/repos/apollographql/apollo-server/contributors","subscribers_url":"https://api.github.com/repos/apollographql/apollo-server/subscribers","subscription_url":"https://api.github.com/repos/apollographql/apollo-server/subscription","commits_url":"https://api.github.com/repos/apollographql/apollo-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apollographql/apollo-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apollographql/apollo-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apollographql/apollo-server/contents/{+path}","compare_url":"https://api.github.com/repos/apollographql/apollo-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apollographql/apollo-server/merges","archive_url":"https://api.github.com/repos/apollographql/apollo-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apollographql/apollo-server/downloads","issues_url":"https://api.github.com/repos/apollographql/apollo-server/issues{/number}","pulls_url":"https://api.github.com/repos/apollographql/apollo-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apollographql/apollo-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apollographql/apollo-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apollographql/apollo-server/labels{/name}","releases_url":"https://api.github.com/repos/apollographql/apollo-server/releases{/id}","deployments_url":"https://api.github.com/repos/apollographql/apollo-server/deployments","created_at":"2016-04-21T09:26:01Z","updated_at":"2018-07-09T12:33:22Z","pushed_at":"2018-07-09T12:56:02Z","git_url":"git://github.com/apollographql/apollo-server.git","ssh_url":"git@github.com:apollographql/apollo-server.git","clone_url":"https://github.com/apollographql/apollo-server.git","svn_url":"https://github.com/apollographql/apollo-server","homepage":"https://www.apollographql.com/docs/apollo-server/","size":4734,"stargazers_count":4463,"watchers_count":4463,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":450,"mirror_url":null,"archived":false,"open_issues_count":149,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":450,"open_issues":149,"watchers":4463,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297"},"html":{"href":"https://github.com/apollographql/apollo-server/pull/1297"},"issue":{"href":"https://api.github.com/repos/apollographql/apollo-server/issues/1297"},"comments":{"href":"https://api.github.com/repos/apollographql/apollo-server/issues/1297/comments"},"review_comments":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297/comments"},"review_comment":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1297/commits"},"statuses":{"href":"https://api.github.com/repos/apollographql/apollo-server/statuses/e54f9be690d0c6b8e4cbe3c6597d29c057bbde14"}},"author_association":"NONE"}}
{"actor":{"display_login":"zionts"}}