{"action":"created","comment":{"url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/comments/80590682","id":80590682,"diff_hunk":"@@ -44,6 +48,10 @@ def print_schema_definition(schema)\n       BUILTIN_SCALARS = Set.new([\"String\", \"Boolean\", \"Int\", \"Float\", \"ID\"])\n       private_constant :BUILTIN_SCALARS\n \n+      def is_spec_directive(directive)\n+        ['skip', 'include', 'deprecated'].include?(directive.name)\n+      end","path":"lib/graphql/schema/printer.rb","position":39,"original_position":39,"commit_id":"30d65d39f045399a29af181179d0b9933b8049ef","original_commit_id":"30d65d39f045399a29af181179d0b9933b8049ef","user":{"login":"cjoudrey","id":385270,"avatar_url":"https://avatars.githubusercontent.com/u/385270?v=3","gravatar_id":"","url":"https://api.github.com/users/cjoudrey","html_url":"https://github.com/cjoudrey","followers_url":"https://api.github.com/users/cjoudrey/followers","following_url":"https://api.github.com/users/cjoudrey/following{/other_user}","gists_url":"https://api.github.com/users/cjoudrey/gists{/gist_id}","starred_url":"https://api.github.com/users/cjoudrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjoudrey/subscriptions","organizations_url":"https://api.github.com/users/cjoudrey/orgs","repos_url":"https://api.github.com/users/cjoudrey/repos","events_url":"https://api.github.com/users/cjoudrey/events{/privacy}","received_events_url":"https://api.github.com/users/cjoudrey/received_events","type":"User","site_admin":false},"body":"Good question.\r\n\r\nI ported this from the JS implementation: https://github.com/graphql/graphql-js/blob/5e3d377e6e0881191efe02b9d40720ff0f0b5b0f/src/utilities/schemaPrinter.js#L28-L44\r\n\r\nMy understanding of the JS code is that when printing the schema, we do not want to include spec directives since they are part of the spec. We still print non-spec directives though.\r\n\r\nWhen printing the introspection query, we only include spec directives.","created_at":"2016-09-26T22:49:53Z","updated_at":"2016-09-26T22:49:53Z","html_url":"https://github.com/rmosolgo/graphql-ruby/pull/275#discussion_r80590682","pull_request_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275","_links":{"self":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/comments/80590682"},"html":{"href":"https://github.com/rmosolgo/graphql-ruby/pull/275#discussion_r80590682"},"pull_request":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275"}}},"pull_request":{"url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275","id":86550649,"html_url":"https://github.com/rmosolgo/graphql-ruby/pull/275","diff_url":"https://github.com/rmosolgo/graphql-ruby/pull/275.diff","patch_url":"https://github.com/rmosolgo/graphql-ruby/pull/275.patch","issue_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/275","number":275,"state":"open","locked":false,"title":"Add deprecations to IDL","user":{"login":"cjoudrey","id":385270,"avatar_url":"https://avatars.githubusercontent.com/u/385270?v=3","gravatar_id":"","url":"https://api.github.com/users/cjoudrey","html_url":"https://github.com/cjoudrey","followers_url":"https://api.github.com/users/cjoudrey/followers","following_url":"https://api.github.com/users/cjoudrey/following{/other_user}","gists_url":"https://api.github.com/users/cjoudrey/gists{/gist_id}","starred_url":"https://api.github.com/users/cjoudrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjoudrey/subscriptions","organizations_url":"https://api.github.com/users/cjoudrey/orgs","repos_url":"https://api.github.com/users/cjoudrey/repos","events_url":"https://api.github.com/users/cjoudrey/events{/privacy}","received_events_url":"https://api.github.com/users/cjoudrey/received_events","type":"User","site_admin":false},"body":"This is part 2 of #273 and is currently based off it.\r\n\r\nThis PR adds support for deprecations in the IDL using directives as per graphql/graphql-js#384.\r\n\r\nPart 3 will be adding descriptions to IDL as per https://github.com/graphql/graphql-js/pull/464.","created_at":"2016-09-23T17:28:16Z","updated_at":"2016-09-26T22:49:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74ef90a51083fe75e9b275c65f941352ce7883af","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275/commits","review_comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275/comments","review_comment_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/275/comments","statuses_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/statuses/30d65d39f045399a29af181179d0b9933b8049ef","head":{"label":"cjoudrey:add-deprecations-to-idl","ref":"add-deprecations-to-idl","sha":"30d65d39f045399a29af181179d0b9933b8049ef","user":{"login":"cjoudrey","id":385270,"avatar_url":"https://avatars.githubusercontent.com/u/385270?v=3","gravatar_id":"","url":"https://api.github.com/users/cjoudrey","html_url":"https://github.com/cjoudrey","followers_url":"https://api.github.com/users/cjoudrey/followers","following_url":"https://api.github.com/users/cjoudrey/following{/other_user}","gists_url":"https://api.github.com/users/cjoudrey/gists{/gist_id}","starred_url":"https://api.github.com/users/cjoudrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjoudrey/subscriptions","organizations_url":"https://api.github.com/users/cjoudrey/orgs","repos_url":"https://api.github.com/users/cjoudrey/repos","events_url":"https://api.github.com/users/cjoudrey/events{/privacy}","received_events_url":"https://api.github.com/users/cjoudrey/received_events","type":"User","site_admin":false},"repo":{"id":67886507,"name":"graphql-ruby","full_name":"cjoudrey/graphql-ruby","owner":{"login":"cjoudrey","id":385270,"avatar_url":"https://avatars.githubusercontent.com/u/385270?v=3","gravatar_id":"","url":"https://api.github.com/users/cjoudrey","html_url":"https://github.com/cjoudrey","followers_url":"https://api.github.com/users/cjoudrey/followers","following_url":"https://api.github.com/users/cjoudrey/following{/other_user}","gists_url":"https://api.github.com/users/cjoudrey/gists{/gist_id}","starred_url":"https://api.github.com/users/cjoudrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjoudrey/subscriptions","organizations_url":"https://api.github.com/users/cjoudrey/orgs","repos_url":"https://api.github.com/users/cjoudrey/repos","events_url":"https://api.github.com/users/cjoudrey/events{/privacy}","received_events_url":"https://api.github.com/users/cjoudrey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cjoudrey/graphql-ruby","description":"Ruby implementation of Facebook's GraphQL ","fork":true,"url":"https://api.github.com/repos/cjoudrey/graphql-ruby","forks_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/forks","keys_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/teams","hooks_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/hooks","issue_events_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/events","assignees_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/tags","blobs_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/languages","stargazers_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/stargazers","contributors_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/contributors","subscribers_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/subscribers","subscription_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/subscription","commits_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/merges","archive_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/downloads","issues_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/labels{/name}","releases_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/cjoudrey/graphql-ruby/deployments","created_at":"2016-09-10T18:03:46Z","updated_at":"2016-09-10T18:03:47Z","pushed_at":"2016-09-25T04:53:51Z","git_url":"git://github.com/cjoudrey/graphql-ruby.git","ssh_url":"git@github.com:cjoudrey/graphql-ruby.git","clone_url":"https://github.com/cjoudrey/graphql-ruby.git","svn_url":"https://github.com/cjoudrey/graphql-ruby","homepage":"","size":1997,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"rmosolgo:master","ref":"master","sha":"f14f76167c32926c8b6d199d5d9b62736c79869f","user":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars.githubusercontent.com/u/2231765?v=3","gravatar_id":"","url":"https://api.github.com/users/rmosolgo","html_url":"https://github.com/rmosolgo","followers_url":"https://api.github.com/users/rmosolgo/followers","following_url":"https://api.github.com/users/rmosolgo/following{/other_user}","gists_url":"https://api.github.com/users/rmosolgo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmosolgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmosolgo/subscriptions","organizations_url":"https://api.github.com/users/rmosolgo/orgs","repos_url":"https://api.github.com/users/rmosolgo/repos","events_url":"https://api.github.com/users/rmosolgo/events{/privacy}","received_events_url":"https://api.github.com/users/rmosolgo/received_events","type":"User","site_admin":false},"repo":{"id":30337170,"name":"graphql-ruby","full_name":"rmosolgo/graphql-ruby","owner":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars.githubusercontent.com/u/2231765?v=3","gravatar_id":"","url":"https://api.github.com/users/rmosolgo","html_url":"https://github.com/rmosolgo","followers_url":"https://api.github.com/users/rmosolgo/followers","following_url":"https://api.github.com/users/rmosolgo/following{/other_user}","gists_url":"https://api.github.com/users/rmosolgo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmosolgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmosolgo/subscriptions","organizations_url":"https://api.github.com/users/rmosolgo/orgs","repos_url":"https://api.github.com/users/rmosolgo/repos","events_url":"https://api.github.com/users/rmosolgo/events{/privacy}","received_events_url":"https://api.github.com/users/rmosolgo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmosolgo/graphql-ruby","description":"Ruby implementation of Facebook's GraphQL ","fork":false,"url":"https://api.github.com/repos/rmosolgo/graphql-ruby","forks_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/forks","keys_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/teams","hooks_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/hooks","issue_events_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/events","assignees_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/tags","blobs_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/languages","stargazers_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/stargazers","contributors_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/contributors","subscribers_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/subscribers","subscription_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/subscription","commits_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/merges","archive_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/downloads","issues_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/labels{/name}","releases_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/deployments","created_at":"2015-02-05T04:11:22Z","updated_at":"2016-09-26T21:51:33Z","pushed_at":"2016-09-26T19:50:32Z","git_url":"git://github.com/rmosolgo/graphql-ruby.git","ssh_url":"git@github.com:rmosolgo/graphql-ruby.git","clone_url":"https://github.com/rmosolgo/graphql-ruby.git","svn_url":"https://github.com/rmosolgo/graphql-ruby","homepage":"","size":2197,"stargazers_count":1051,"watchers_count":1051,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":89,"mirror_url":null,"open_issues_count":22,"forks":89,"open_issues":22,"watchers":1051,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275"},"html":{"href":"https://github.com/rmosolgo/graphql-ruby/pull/275"},"issue":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/275"},"comments":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/275/comments"},"review_comments":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275/comments"},"review_comment":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/275/commits"},"statuses":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/statuses/30d65d39f045399a29af181179d0b9933b8049ef"}}}}
{"actor":{"display_login":"cjoudrey"}}