{"action":"opened","number":69,"pull_request":{"url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/69","id":231052186,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMDUyMTg2","html_url":"https://github.com/ExpediaDotCom/graphql-kotlin/pull/69","diff_url":"https://github.com/ExpediaDotCom/graphql-kotlin/pull/69.diff","patch_url":"https://github.com/ExpediaDotCom/graphql-kotlin/pull/69.patch","issue_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues/69","number":69,"state":"open","locked":false,"title":"Additional SchemaGeneratorHook that allows modifying GraphQLTypes.","user":{"login":"d4rken","id":1439229,"node_id":"MDQ6VXNlcjE0MzkyMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/1439229?v=4","gravatar_id":"","url":"https://api.github.com/users/d4rken","html_url":"https://github.com/d4rken","followers_url":"https://api.github.com/users/d4rken/followers","following_url":"https://api.github.com/users/d4rken/following{/other_user}","gists_url":"https://api.github.com/users/d4rken/gists{/gist_id}","starred_url":"https://api.github.com/users/d4rken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4rken/subscriptions","organizations_url":"https://api.github.com/users/d4rken/orgs","repos_url":"https://api.github.com/users/d4rken/repos","events_url":"https://api.github.com/users/d4rken/events{/privacy}","received_events_url":"https://api.github.com/users/d4rken/received_events","type":"User","site_admin":false},"body":"This enables rewiring based on directives (see #60) by offering a general purpose hooks that allows us to rewire/modify generated graphqltypes.\r\n\r\nThe base example for directive based authentication, would work with this:\r\nhttps://www.graphql-java.com/documentation/v11/sdl-directives/\r\n\r\nWith this hook available I can then use a helper class such as this can be used to wire up the directives:\r\nhttps://gist.github.com/d4rken/7cb60a6a7b315d25766ff15884f9b99b\r\n\r\nThe new hook has a placeholder `WiringContext` which would need to get some functionality to allow for feature parity with graphql-java's [`SchemaDirectiveEnvironment`](https://github.com/graphql-java/graphql-java/blob/5eb2ab743bf7afc05e2243d3dc0bcf22a0384366/src/main/java/graphql/schema/idl/SchemaDirectiveWiringEnvironment.java)\r\n\r\nI was a bit out of my depth there though and couldn't find a clean solution.\r\n\r\nTheoretically we could just keep it empty until someone needs the functionality then provide it. As it's passed via \"context\" object this wouldn't lead to breaking changes. `WiringContext` is created inside the `SchemaGenerator` where it would have access to the necessary information it's just unclear in what form to provide it.\r\n\r\nI think it comes down to how close we want to mirror graphql-java and it's `SchemaDirectiveWiringEnvironment`...\r\n\r\n","created_at":"2018-11-15T02:57:20Z","updated_at":"2018-11-15T02:57:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/69/commits","review_comments_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/69/comments","review_comment_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues/69/comments","statuses_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/statuses/4c2d6eff1f0cb90b1b0028db97d021a590811749","head":{"label":"d4rken:pr-directive-wiring","ref":"pr-directive-wiring","sha":"4c2d6eff1f0cb90b1b0028db97d021a590811749","user":{"login":"d4rken","id":1439229,"node_id":"MDQ6VXNlcjE0MzkyMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/1439229?v=4","gravatar_id":"","url":"https://api.github.com/users/d4rken","html_url":"https://github.com/d4rken","followers_url":"https://api.github.com/users/d4rken/followers","following_url":"https://api.github.com/users/d4rken/following{/other_user}","gists_url":"https://api.github.com/users/d4rken/gists{/gist_id}","starred_url":"https://api.github.com/users/d4rken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4rken/subscriptions","organizations_url":"https://api.github.com/users/d4rken/orgs","repos_url":"https://api.github.com/users/d4rken/repos","events_url":"https://api.github.com/users/d4rken/events{/privacy}","received_events_url":"https://api.github.com/users/d4rken/received_events","type":"User","site_admin":false},"repo":{"id":157257082,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyNTcwODI=","name":"graphql-kotlin","full_name":"d4rken/graphql-kotlin","private":false,"owner":{"login":"d4rken","id":1439229,"node_id":"MDQ6VXNlcjE0MzkyMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/1439229?v=4","gravatar_id":"","url":"https://api.github.com/users/d4rken","html_url":"https://github.com/d4rken","followers_url":"https://api.github.com/users/d4rken/followers","following_url":"https://api.github.com/users/d4rken/following{/other_user}","gists_url":"https://api.github.com/users/d4rken/gists{/gist_id}","starred_url":"https://api.github.com/users/d4rken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4rken/subscriptions","organizations_url":"https://api.github.com/users/d4rken/orgs","repos_url":"https://api.github.com/users/d4rken/repos","events_url":"https://api.github.com/users/d4rken/events{/privacy}","received_events_url":"https://api.github.com/users/d4rken/received_events","type":"User","site_admin":false},"html_url":"https://github.com/d4rken/graphql-kotlin","description":"Code-only GraphQL schema generation for Kotlin","fork":true,"url":"https://api.github.com/repos/d4rken/graphql-kotlin","forks_url":"https://api.github.com/repos/d4rken/graphql-kotlin/forks","keys_url":"https://api.github.com/repos/d4rken/graphql-kotlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/d4rken/graphql-kotlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/d4rken/graphql-kotlin/teams","hooks_url":"https://api.github.com/repos/d4rken/graphql-kotlin/hooks","issue_events_url":"https://api.github.com/repos/d4rken/graphql-kotlin/issues/events{/number}","events_url":"https://api.github.com/repos/d4rken/graphql-kotlin/events","assignees_url":"https://api.github.com/repos/d4rken/graphql-kotlin/assignees{/user}","branches_url":"https://api.github.com/repos/d4rken/graphql-kotlin/branches{/branch}","tags_url":"https://api.github.com/repos/d4rken/graphql-kotlin/tags","blobs_url":"https://api.github.com/repos/d4rken/graphql-kotlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/d4rken/graphql-kotlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/d4rken/graphql-kotlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/d4rken/graphql-kotlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/d4rken/graphql-kotlin/statuses/{sha}","languages_url":"https://api.github.com/repos/d4rken/graphql-kotlin/languages","stargazers_url":"https://api.github.com/repos/d4rken/graphql-kotlin/stargazers","contributors_url":"https://api.github.com/repos/d4rken/graphql-kotlin/contributors","subscribers_url":"https://api.github.com/repos/d4rken/graphql-kotlin/subscribers","subscription_url":"https://api.github.com/repos/d4rken/graphql-kotlin/subscription","commits_url":"https://api.github.com/repos/d4rken/graphql-kotlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/d4rken/graphql-kotlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/d4rken/graphql-kotlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/d4rken/graphql-kotlin/issues/comments{/number}","contents_url":"https://api.github.com/repos/d4rken/graphql-kotlin/contents/{+path}","compare_url":"https://api.github.com/repos/d4rken/graphql-kotlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/d4rken/graphql-kotlin/merges","archive_url":"https://api.github.com/repos/d4rken/graphql-kotlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/d4rken/graphql-kotlin/downloads","issues_url":"https://api.github.com/repos/d4rken/graphql-kotlin/issues{/number}","pulls_url":"https://api.github.com/repos/d4rken/graphql-kotlin/pulls{/number}","milestones_url":"https://api.github.com/repos/d4rken/graphql-kotlin/milestones{/number}","notifications_url":"https://api.github.com/repos/d4rken/graphql-kotlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/d4rken/graphql-kotlin/labels{/name}","releases_url":"https://api.github.com/repos/d4rken/graphql-kotlin/releases{/id}","deployments_url":"https://api.github.com/repos/d4rken/graphql-kotlin/deployments","created_at":"2018-11-12T18:21:41Z","updated_at":"2018-11-15T02:42:12Z","pushed_at":"2018-11-15T02:42:11Z","git_url":"git://github.com/d4rken/graphql-kotlin.git","ssh_url":"git@github.com:d4rken/graphql-kotlin.git","clone_url":"https://github.com/d4rken/graphql-kotlin.git","svn_url":"https://github.com/d4rken/graphql-kotlin","homepage":null,"size":220,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ExpediaDotCom:master","ref":"master","sha":"bf4452dfc1374c4e22591c6e52ce9270e1063a0e","user":{"login":"ExpediaDotCom","id":8900718,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MDA3MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/8900718?v=4","gravatar_id":"","url":"https://api.github.com/users/ExpediaDotCom","html_url":"https://github.com/ExpediaDotCom","followers_url":"https://api.github.com/users/ExpediaDotCom/followers","following_url":"https://api.github.com/users/ExpediaDotCom/following{/other_user}","gists_url":"https://api.github.com/users/ExpediaDotCom/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpediaDotCom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpediaDotCom/subscriptions","organizations_url":"https://api.github.com/users/ExpediaDotCom/orgs","repos_url":"https://api.github.com/users/ExpediaDotCom/repos","events_url":"https://api.github.com/users/ExpediaDotCom/events{/privacy}","received_events_url":"https://api.github.com/users/ExpediaDotCom/received_events","type":"Organization","site_admin":false},"repo":{"id":148706161,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg3MDYxNjE=","name":"graphql-kotlin","full_name":"ExpediaDotCom/graphql-kotlin","private":false,"owner":{"login":"ExpediaDotCom","id":8900718,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MDA3MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/8900718?v=4","gravatar_id":"","url":"https://api.github.com/users/ExpediaDotCom","html_url":"https://github.com/ExpediaDotCom","followers_url":"https://api.github.com/users/ExpediaDotCom/followers","following_url":"https://api.github.com/users/ExpediaDotCom/following{/other_user}","gists_url":"https://api.github.com/users/ExpediaDotCom/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpediaDotCom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpediaDotCom/subscriptions","organizations_url":"https://api.github.com/users/ExpediaDotCom/orgs","repos_url":"https://api.github.com/users/ExpediaDotCom/repos","events_url":"https://api.github.com/users/ExpediaDotCom/events{/privacy}","received_events_url":"https://api.github.com/users/ExpediaDotCom/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ExpediaDotCom/graphql-kotlin","description":"Code-only GraphQL schema generation for Kotlin","fork":false,"url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin","forks_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/forks","keys_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/teams","hooks_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/hooks","issue_events_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues/events{/number}","events_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/events","assignees_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/assignees{/user}","branches_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/branches{/branch}","tags_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/tags","blobs_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/statuses/{sha}","languages_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/languages","stargazers_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/stargazers","contributors_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/contributors","subscribers_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/subscribers","subscription_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/subscription","commits_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/contents/{+path}","compare_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/merges","archive_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/downloads","issues_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues{/number}","pulls_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls{/number}","milestones_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/milestones{/number}","notifications_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/labels{/name}","releases_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/releases{/id}","deployments_url":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/deployments","created_at":"2018-09-13T22:41:30Z","updated_at":"2018-11-14T22:13:00Z","pushed_at":"2018-11-15T00:29:48Z","git_url":"git://github.com/ExpediaDotCom/graphql-kotlin.git","ssh_url":"git@github.com:ExpediaDotCom/graphql-kotlin.git","clone_url":"https://github.com/ExpediaDotCom/graphql-kotlin.git","svn_url":"https://github.com/ExpediaDotCom/graphql-kotlin","homepage":null,"size":237,"stargazers_count":42,"watchers_count":42,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":10,"open_issues":4,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/69"},"html":{"href":"https://github.com/ExpediaDotCom/graphql-kotlin/pull/69"},"issue":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues/69"},"comments":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/ExpediaDotCom/graphql-kotlin/statuses/4c2d6eff1f0cb90b1b0028db97d021a590811749"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":20,"deletions":1,"changed_files":4}}
{"actor":{"display_login":"d4rken"}}