{"action":"created","issue":{"url":"https://api.github.com/repos/exAspArk/graphql-guard/issues/16","repository_url":"https://api.github.com/repos/exAspArk/graphql-guard","labels_url":"https://api.github.com/repos/exAspArk/graphql-guard/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/exAspArk/graphql-guard/issues/16/comments","events_url":"https://api.github.com/repos/exAspArk/graphql-guard/issues/16/events","html_url":"https://github.com/exAspArk/graphql-guard/pull/16","id":332061283,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NjM3MjY0","number":16,"title":"Allow inline policies to be used with class-based API of graphql-ruby 1.8","user":{"login":"kymmt90","id":9291031,"node_id":"MDQ6VXNlcjkyOTEwMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/9291031?v=4","gravatar_id":"","url":"https://api.github.com/users/kymmt90","html_url":"https://github.com/kymmt90","followers_url":"https://api.github.com/users/kymmt90/followers","following_url":"https://api.github.com/users/kymmt90/following{/other_user}","gists_url":"https://api.github.com/users/kymmt90/gists{/gist_id}","starred_url":"https://api.github.com/users/kymmt90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kymmt90/subscriptions","organizations_url":"https://api.github.com/users/kymmt90/orgs","repos_url":"https://api.github.com/users/kymmt90/repos","events_url":"https://api.github.com/users/kymmt90/events{/privacy}","received_events_url":"https://api.github.com/users/kymmt90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-13T16:00:33Z","updated_at":"2018-06-28T13:26:35Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/exAspArk/graphql-guard/pulls/16","html_url":"https://github.com/exAspArk/graphql-guard/pull/16","diff_url":"https://github.com/exAspArk/graphql-guard/pull/16.diff","patch_url":"https://github.com/exAspArk/graphql-guard/pull/16.patch"},"body":"Partially fixes the problem discussed in #15\r\n\r\nThis PR allows inline guard policies to be used with class-based API of graphql-ruby 1.8.\r\n\r\nIn class-based API of graphql-ruby 1.8, `GraphQL::Schema::Object` and `GraphQL::Schema::Field` are used as base classes for class-based schema. In order to use class-based API with graphql-guard and to keep interface compatibility, these classes need to accept metadata `guard` and `mask`. `accepts_definition` is available for these cases.\r\n\r\nhttp://graphql-ruby.org/api-doc/1.8.2/GraphQL/Schema/Member/AcceptsDefinition\r\n\r\nAlso in order to keep `GraphQL::Guard::Testing` compatibility, `GraphQL::Schema::Object` needs to have the class method `.field_with_guard` where these methods are utilized:\r\n\r\n- `fields`\r\n  - gets fields of a class-based object\r\n- `to_graphql`\r\n  - converts a class-based object like `GraphQL::Schema::Object` to corresponding legacy-style object like `GraphQL::ObjectType`\r\n  - [GraphQL - Extending the GraphQL-Ruby Type Definition System](http://graphql-ruby.org/type_definitions/extensions)\r\n\r\nWhen class-based API is used, the testing method `GraphQL::Field#guard` uses objects converted by `to_graphql`.\r\n\r\nThese changes are tested by graphql-ruby 1.8.2.\r\n"},"comment":{"url":"https://api.github.com/repos/exAspArk/graphql-guard/issues/comments/401033857","html_url":"https://github.com/exAspArk/graphql-guard/pull/16#issuecomment-401033857","issue_url":"https://api.github.com/repos/exAspArk/graphql-guard/issues/16","id":401033857,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTAzMzg1Nw==","user":{"login":"haizop","id":11775176,"node_id":"MDQ6VXNlcjExNzc1MTc2","avatar_url":"https://avatars3.githubusercontent.com/u/11775176?v=4","gravatar_id":"","url":"https://api.github.com/users/haizop","html_url":"https://github.com/haizop","followers_url":"https://api.github.com/users/haizop/followers","following_url":"https://api.github.com/users/haizop/following{/other_user}","gists_url":"https://api.github.com/users/haizop/gists{/gist_id}","starred_url":"https://api.github.com/users/haizop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haizop/subscriptions","organizations_url":"https://api.github.com/users/haizop/orgs","repos_url":"https://api.github.com/users/haizop/repos","events_url":"https://api.github.com/users/haizop/events{/privacy}","received_events_url":"https://api.github.com/users/haizop/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T13:26:35Z","updated_at":"2018-06-28T13:26:35Z","author_association":"NONE","body":"@exAspArk  - So is this repository abandoned?"}}
{"actor":{"display_login":"haizop"}}