{"action":"created","comment":{"url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/comments/193843430","pull_request_review_id":126899819,"id":193843430,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mzg0MzQzMA==","diff_hunk":"@@ -161,10 +161,35 @@ app.listen(3001);\n \n ### Hapi\n \n+#### Version 17+\n ```js\n import hapi from 'hapi';\n import { hapi as voyagerMiddleware } from 'graphql-voyager/middleware';\n \n+const server = new Hapi.Server({\n+  port: 3001\n+});\n+\n+const init = async () => {\n+  await server.register({\n+    plugin: voyagerMiddleware,\n+    options: {\n+      path: '/voyager',\n+      endpointUrl: '/graphql'\n+    }\n+  });\n+\n+  await server.start();\n+};\n+\n+init();","path":"README.md","position":25,"original_position":25,"commit_id":"2a14372343ef752554e1bb691404fd97db8bc1c4","original_commit_id":"2a14372343ef752554e1bb691404fd97db8bc1c4","user":{"login":"IvanGoncharov","id":8336157,"node_id":"MDQ6VXNlcjgzMzYxNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/8336157?v=4","gravatar_id":"","url":"https://api.github.com/users/IvanGoncharov","html_url":"https://github.com/IvanGoncharov","followers_url":"https://api.github.com/users/IvanGoncharov/followers","following_url":"https://api.github.com/users/IvanGoncharov/following{/other_user}","gists_url":"https://api.github.com/users/IvanGoncharov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanGoncharov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanGoncharov/subscriptions","organizations_url":"https://api.github.com/users/IvanGoncharov/orgs","repos_url":"https://api.github.com/users/IvanGoncharov/repos","events_url":"https://api.github.com/users/IvanGoncharov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanGoncharov/received_events","type":"User","site_admin":false},"body":"Not a HAPI user but it took me some mental effort to understand that you need `init` just to chain two promisses.\r\nCan it be written like that:\r\n```js\r\nasync function startServer() {\r\n  const server = new Hapi.Server({\r\n    port: 3001\r\n  });\r\n\r\n  await server.register({\r\n    plugin: voyagerMiddleware,\r\n    options: {\r\n      path: '/voyager',\r\n      endpointUrl: '/graphql'\r\n    }\r\n  });\r\n \r\n  await server.start();\r\n\r\n  return server;\r\n};\r\n \r\ninit();\r\n```","created_at":"2018-06-07T18:17:58Z","updated_at":"2018-06-07T18:17:58Z","html_url":"https://github.com/APIs-guru/graphql-voyager/pull/66#discussion_r193843430","pull_request_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/comments/193843430"},"html":{"href":"https://github.com/APIs-guru/graphql-voyager/pull/66#discussion_r193843430"},"pull_request":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66","id":193394432,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMzk0NDMy","html_url":"https://github.com/APIs-guru/graphql-voyager/pull/66","diff_url":"https://github.com/APIs-guru/graphql-voyager/pull/66.diff","patch_url":"https://github.com/APIs-guru/graphql-voyager/pull/66.patch","issue_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues/66","number":66,"state":"open","locked":false,"title":"Add support for HAPI 17 in Middleware","user":{"login":"mkochendorfer","id":15349550,"node_id":"MDQ6VXNlcjE1MzQ5NTUw","avatar_url":"https://avatars1.githubusercontent.com/u/15349550?v=4","gravatar_id":"","url":"https://api.github.com/users/mkochendorfer","html_url":"https://github.com/mkochendorfer","followers_url":"https://api.github.com/users/mkochendorfer/followers","following_url":"https://api.github.com/users/mkochendorfer/following{/other_user}","gists_url":"https://api.github.com/users/mkochendorfer/gists{/gist_id}","starred_url":"https://api.github.com/users/mkochendorfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkochendorfer/subscriptions","organizations_url":"https://api.github.com/users/mkochendorfer/orgs","repos_url":"https://api.github.com/users/mkochendorfer/repos","events_url":"https://api.github.com/users/mkochendorfer/events{/privacy}","received_events_url":"https://api.github.com/users/mkochendorfer/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-07T17:27:23Z","updated_at":"2018-06-07T18:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a64df0cf1324e244091b8d2e4a9ed50586ea420","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66/commits","review_comments_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66/comments","review_comment_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues/66/comments","statuses_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/statuses/2a14372343ef752554e1bb691404fd97db8bc1c4","head":{"label":"mkochendorfer:master","ref":"master","sha":"2a14372343ef752554e1bb691404fd97db8bc1c4","user":{"login":"mkochendorfer","id":15349550,"node_id":"MDQ6VXNlcjE1MzQ5NTUw","avatar_url":"https://avatars1.githubusercontent.com/u/15349550?v=4","gravatar_id":"","url":"https://api.github.com/users/mkochendorfer","html_url":"https://github.com/mkochendorfer","followers_url":"https://api.github.com/users/mkochendorfer/followers","following_url":"https://api.github.com/users/mkochendorfer/following{/other_user}","gists_url":"https://api.github.com/users/mkochendorfer/gists{/gist_id}","starred_url":"https://api.github.com/users/mkochendorfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkochendorfer/subscriptions","organizations_url":"https://api.github.com/users/mkochendorfer/orgs","repos_url":"https://api.github.com/users/mkochendorfer/repos","events_url":"https://api.github.com/users/mkochendorfer/events{/privacy}","received_events_url":"https://api.github.com/users/mkochendorfer/received_events","type":"User","site_admin":false},"repo":{"id":136509647,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY1MDk2NDc=","name":"graphql-voyager","full_name":"mkochendorfer/graphql-voyager","owner":{"login":"mkochendorfer","id":15349550,"node_id":"MDQ6VXNlcjE1MzQ5NTUw","avatar_url":"https://avatars1.githubusercontent.com/u/15349550?v=4","gravatar_id":"","url":"https://api.github.com/users/mkochendorfer","html_url":"https://github.com/mkochendorfer","followers_url":"https://api.github.com/users/mkochendorfer/followers","following_url":"https://api.github.com/users/mkochendorfer/following{/other_user}","gists_url":"https://api.github.com/users/mkochendorfer/gists{/gist_id}","starred_url":"https://api.github.com/users/mkochendorfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkochendorfer/subscriptions","organizations_url":"https://api.github.com/users/mkochendorfer/orgs","repos_url":"https://api.github.com/users/mkochendorfer/repos","events_url":"https://api.github.com/users/mkochendorfer/events{/privacy}","received_events_url":"https://api.github.com/users/mkochendorfer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkochendorfer/graphql-voyager","description":"🛰️ Represent any GraphQL API as an interactive graph","fork":true,"url":"https://api.github.com/repos/mkochendorfer/graphql-voyager","forks_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/forks","keys_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/teams","hooks_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/hooks","issue_events_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/issues/events{/number}","events_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/events","assignees_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/assignees{/user}","branches_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/branches{/branch}","tags_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/tags","blobs_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/statuses/{sha}","languages_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/languages","stargazers_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/stargazers","contributors_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/contributors","subscribers_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/subscribers","subscription_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/subscription","commits_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/contents/{+path}","compare_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/merges","archive_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/downloads","issues_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/issues{/number}","pulls_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/pulls{/number}","milestones_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/milestones{/number}","notifications_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/labels{/name}","releases_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/releases{/id}","deployments_url":"https://api.github.com/repos/mkochendorfer/graphql-voyager/deployments","created_at":"2018-06-07T17:23:36Z","updated_at":"2018-06-07T18:04:44Z","pushed_at":"2018-06-07T18:04:43Z","git_url":"git://github.com/mkochendorfer/graphql-voyager.git","ssh_url":"git@github.com:mkochendorfer/graphql-voyager.git","clone_url":"https://github.com/mkochendorfer/graphql-voyager.git","svn_url":"https://github.com/mkochendorfer/graphql-voyager","homepage":"https://apis.guru/graphql-voyager/","size":10300,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"APIs-guru:master","ref":"master","sha":"24c895560d3e43aed8e7936c069c47e3583402ea","user":{"login":"APIs-guru","id":10975548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTc1NTQ4","avatar_url":"https://avatars0.githubusercontent.com/u/10975548?v=4","gravatar_id":"","url":"https://api.github.com/users/APIs-guru","html_url":"https://github.com/APIs-guru","followers_url":"https://api.github.com/users/APIs-guru/followers","following_url":"https://api.github.com/users/APIs-guru/following{/other_user}","gists_url":"https://api.github.com/users/APIs-guru/gists{/gist_id}","starred_url":"https://api.github.com/users/APIs-guru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/APIs-guru/subscriptions","organizations_url":"https://api.github.com/users/APIs-guru/orgs","repos_url":"https://api.github.com/users/APIs-guru/repos","events_url":"https://api.github.com/users/APIs-guru/events{/privacy}","received_events_url":"https://api.github.com/users/APIs-guru/received_events","type":"Organization","site_admin":false},"repo":{"id":75088956,"node_id":"MDEwOlJlcG9zaXRvcnk3NTA4ODk1Ng==","name":"graphql-voyager","full_name":"APIs-guru/graphql-voyager","owner":{"login":"APIs-guru","id":10975548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTc1NTQ4","avatar_url":"https://avatars0.githubusercontent.com/u/10975548?v=4","gravatar_id":"","url":"https://api.github.com/users/APIs-guru","html_url":"https://github.com/APIs-guru","followers_url":"https://api.github.com/users/APIs-guru/followers","following_url":"https://api.github.com/users/APIs-guru/following{/other_user}","gists_url":"https://api.github.com/users/APIs-guru/gists{/gist_id}","starred_url":"https://api.github.com/users/APIs-guru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/APIs-guru/subscriptions","organizations_url":"https://api.github.com/users/APIs-guru/orgs","repos_url":"https://api.github.com/users/APIs-guru/repos","events_url":"https://api.github.com/users/APIs-guru/events{/privacy}","received_events_url":"https://api.github.com/users/APIs-guru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/APIs-guru/graphql-voyager","description":"🛰️ Represent any GraphQL API as an interactive graph","fork":false,"url":"https://api.github.com/repos/APIs-guru/graphql-voyager","forks_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/forks","keys_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/teams","hooks_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/hooks","issue_events_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues/events{/number}","events_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/events","assignees_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/assignees{/user}","branches_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/branches{/branch}","tags_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/tags","blobs_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/git/refs{/sha}","trees_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/statuses/{sha}","languages_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/languages","stargazers_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/stargazers","contributors_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/contributors","subscribers_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/subscribers","subscription_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/subscription","commits_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/commits{/sha}","git_commits_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/git/commits{/sha}","comments_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/comments{/number}","issue_comment_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues/comments{/number}","contents_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/contents/{+path}","compare_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/merges","archive_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/downloads","issues_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues{/number}","pulls_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls{/number}","milestones_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/milestones{/number}","notifications_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/labels{/name}","releases_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/releases{/id}","deployments_url":"https://api.github.com/repos/APIs-guru/graphql-voyager/deployments","created_at":"2016-11-29T14:26:53Z","updated_at":"2018-06-07T17:51:16Z","pushed_at":"2018-06-07T18:04:44Z","git_url":"git://github.com/APIs-guru/graphql-voyager.git","ssh_url":"git@github.com:APIs-guru/graphql-voyager.git","clone_url":"https://github.com/APIs-guru/graphql-voyager.git","svn_url":"https://github.com/APIs-guru/graphql-voyager","homepage":"https://apis.guru/graphql-voyager/","size":10300,"stargazers_count":2917,"watchers_count":2917,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":113,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":113,"open_issues":28,"watchers":2917,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66"},"html":{"href":"https://github.com/APIs-guru/graphql-voyager/pull/66"},"issue":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues/66"},"comments":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/APIs-guru/graphql-voyager/statuses/2a14372343ef752554e1bb691404fd97db8bc1c4"}},"author_association":"NONE"}}
{"actor":{"display_login":"IvanGoncharov"}}