{"action":"created","comment":{"url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/comments/209501806","pull_request_review_id":145526592,"id":209501806,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTUwMTgwNg==","diff_hunk":"@@ -72,8 +74,15 @@ public function getResolverCallable(Definition $definition) {\n \t\t$app = $this->app;\n \n \t\treturn function ($root, array $args, $context, ResolveInfo $info) use ($definition, $app) {\n-\t\t\t$fields = $info->getFieldSelection(3);\n \t\t\t$reflect = new \\ReflectionClass($this);\n+\n+\t\t\t// check, if Paginable interface was implemented by given Transformer\n+\t\t\t// Paginable interface has an extra wrapper for data-fields\n+\t\t\t$isPaginable = $this instanceof Paginable;","path":"src/Support/Transformer/Transformer.php","position":25,"original_position":25,"commit_id":"88ceb91f20a32bdf65387a37c8b5e696a16badfd","original_commit_id":"88ceb91f20a32bdf65387a37c8b5e696a16badfd","user":{"login":"cmizzi","id":340143,"node_id":"MDQ6VXNlcjM0MDE0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/340143?v=4","gravatar_id":"","url":"https://api.github.com/users/cmizzi","html_url":"https://github.com/cmizzi","followers_url":"https://api.github.com/users/cmizzi/followers","following_url":"https://api.github.com/users/cmizzi/following{/other_user}","gists_url":"https://api.github.com/users/cmizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/cmizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmizzi/subscriptions","organizations_url":"https://api.github.com/users/cmizzi/orgs","repos_url":"https://api.github.com/users/cmizzi/repos","events_url":"https://api.github.com/users/cmizzi/events{/privacy}","received_events_url":"https://api.github.com/users/cmizzi/received_events","type":"User","site_admin":false},"body":"`Paginable` doesn't seem to be imported with `use` ?","created_at":"2018-08-13T06:31:43Z","updated_at":"2018-08-13T06:31:43Z","html_url":"https://github.com/studio-net/laravel-graphql/pull/27#discussion_r209501806","pull_request_url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/comments/209501806"},"html":{"href":"https://github.com/studio-net/laravel-graphql/pull/27#discussion_r209501806"},"pull_request":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27","id":206264909,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjY0OTA5","html_url":"https://github.com/studio-net/laravel-graphql/pull/27","diff_url":"https://github.com/studio-net/laravel-graphql/pull/27.diff","patch_url":"https://github.com/studio-net/laravel-graphql/pull/27.patch","issue_url":"https://api.github.com/repos/studio-net/laravel-graphql/issues/27","number":27,"state":"open","locked":false,"title":"Fixing n+1 relations problem","user":{"login":"lorado","id":4480983,"node_id":"MDQ6VXNlcjQ0ODA5ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/4480983?v=4","gravatar_id":"","url":"https://api.github.com/users/lorado","html_url":"https://github.com/lorado","followers_url":"https://api.github.com/users/lorado/followers","following_url":"https://api.github.com/users/lorado/following{/other_user}","gists_url":"https://api.github.com/users/lorado/gists{/gist_id}","starred_url":"https://api.github.com/users/lorado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorado/subscriptions","organizations_url":"https://api.github.com/users/lorado/orgs","repos_url":"https://api.github.com/users/lorado/repos","events_url":"https://api.github.com/users/lorado/events{/privacy}","received_events_url":"https://api.github.com/users/lorado/received_events","type":"User","site_admin":false},"body":"Fix for #26\r\n\r\nAs you can see, I increased fields depth, if it is a ListTransformer, because one extra depth-level goes for `items {...}`. Moreover I pick fields from `items`, and pass them then to guessing relations.\r\n\r\n`guessWithRelations()` is now recursive and takes 3 params\r\n\r\n- Eloquent model object\r\n- Fields for the given model, so we can check for relations\r\n- Parents relation name, as it has to be prepended to currently found relation\r\n\r\nWhat do you think? As Transformers are currently used just by the lib, it has no breaking changes.      ","created_at":"2018-08-05T23:57:35Z","updated_at":"2018-08-13T06:31:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39561de2454f69fe222971d51e22dc8aaa9cb402","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27/commits","review_comments_url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27/comments","review_comment_url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/studio-net/laravel-graphql/issues/27/comments","statuses_url":"https://api.github.com/repos/studio-net/laravel-graphql/statuses/88ceb91f20a32bdf65387a37c8b5e696a16badfd","head":{"label":"lorado:bug/26","ref":"bug/26","sha":"88ceb91f20a32bdf65387a37c8b5e696a16badfd","user":{"login":"lorado","id":4480983,"node_id":"MDQ6VXNlcjQ0ODA5ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/4480983?v=4","gravatar_id":"","url":"https://api.github.com/users/lorado","html_url":"https://github.com/lorado","followers_url":"https://api.github.com/users/lorado/followers","following_url":"https://api.github.com/users/lorado/following{/other_user}","gists_url":"https://api.github.com/users/lorado/gists{/gist_id}","starred_url":"https://api.github.com/users/lorado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorado/subscriptions","organizations_url":"https://api.github.com/users/lorado/orgs","repos_url":"https://api.github.com/users/lorado/repos","events_url":"https://api.github.com/users/lorado/events{/privacy}","received_events_url":"https://api.github.com/users/lorado/received_events","type":"User","site_admin":false},"repo":{"id":143655828,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM2NTU4Mjg=","name":"laravel-graphql","full_name":"lorado/laravel-graphql","owner":{"login":"lorado","id":4480983,"node_id":"MDQ6VXNlcjQ0ODA5ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/4480983?v=4","gravatar_id":"","url":"https://api.github.com/users/lorado","html_url":"https://github.com/lorado","followers_url":"https://api.github.com/users/lorado/followers","following_url":"https://api.github.com/users/lorado/following{/other_user}","gists_url":"https://api.github.com/users/lorado/gists{/gist_id}","starred_url":"https://api.github.com/users/lorado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorado/subscriptions","organizations_url":"https://api.github.com/users/lorado/orgs","repos_url":"https://api.github.com/users/lorado/repos","events_url":"https://api.github.com/users/lorado/events{/privacy}","received_events_url":"https://api.github.com/users/lorado/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lorado/laravel-graphql","description":"GraphQL implementation with power of Laravel","fork":true,"url":"https://api.github.com/repos/lorado/laravel-graphql","forks_url":"https://api.github.com/repos/lorado/laravel-graphql/forks","keys_url":"https://api.github.com/repos/lorado/laravel-graphql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lorado/laravel-graphql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lorado/laravel-graphql/teams","hooks_url":"https://api.github.com/repos/lorado/laravel-graphql/hooks","issue_events_url":"https://api.github.com/repos/lorado/laravel-graphql/issues/events{/number}","events_url":"https://api.github.com/repos/lorado/laravel-graphql/events","assignees_url":"https://api.github.com/repos/lorado/laravel-graphql/assignees{/user}","branches_url":"https://api.github.com/repos/lorado/laravel-graphql/branches{/branch}","tags_url":"https://api.github.com/repos/lorado/laravel-graphql/tags","blobs_url":"https://api.github.com/repos/lorado/laravel-graphql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lorado/laravel-graphql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lorado/laravel-graphql/git/refs{/sha}","trees_url":"https://api.github.com/repos/lorado/laravel-graphql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lorado/laravel-graphql/statuses/{sha}","languages_url":"https://api.github.com/repos/lorado/laravel-graphql/languages","stargazers_url":"https://api.github.com/repos/lorado/laravel-graphql/stargazers","contributors_url":"https://api.github.com/repos/lorado/laravel-graphql/contributors","subscribers_url":"https://api.github.com/repos/lorado/laravel-graphql/subscribers","subscription_url":"https://api.github.com/repos/lorado/laravel-graphql/subscription","commits_url":"https://api.github.com/repos/lorado/laravel-graphql/commits{/sha}","git_commits_url":"https://api.github.com/repos/lorado/laravel-graphql/git/commits{/sha}","comments_url":"https://api.github.com/repos/lorado/laravel-graphql/comments{/number}","issue_comment_url":"https://api.github.com/repos/lorado/laravel-graphql/issues/comments{/number}","contents_url":"https://api.github.com/repos/lorado/laravel-graphql/contents/{+path}","compare_url":"https://api.github.com/repos/lorado/laravel-graphql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lorado/laravel-graphql/merges","archive_url":"https://api.github.com/repos/lorado/laravel-graphql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lorado/laravel-graphql/downloads","issues_url":"https://api.github.com/repos/lorado/laravel-graphql/issues{/number}","pulls_url":"https://api.github.com/repos/lorado/laravel-graphql/pulls{/number}","milestones_url":"https://api.github.com/repos/lorado/laravel-graphql/milestones{/number}","notifications_url":"https://api.github.com/repos/lorado/laravel-graphql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lorado/laravel-graphql/labels{/name}","releases_url":"https://api.github.com/repos/lorado/laravel-graphql/releases{/id}","deployments_url":"https://api.github.com/repos/lorado/laravel-graphql/deployments","created_at":"2018-08-05T23:47:00Z","updated_at":"2018-08-05T23:47:02Z","pushed_at":"2018-08-08T21:57:35Z","git_url":"git://github.com/lorado/laravel-graphql.git","ssh_url":"git@github.com:lorado/laravel-graphql.git","clone_url":"https://github.com/lorado/laravel-graphql.git","svn_url":"https://github.com/lorado/laravel-graphql","homepage":"https://github.com/studio-net/laravel-graphql/","size":359,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"studio-net:master","ref":"master","sha":"9ff95f12f1ef8bd09c796b65aefc7b76b52105d0","user":{"login":"studio-net","id":7984160,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5ODQxNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/7984160?v=4","gravatar_id":"","url":"https://api.github.com/users/studio-net","html_url":"https://github.com/studio-net","followers_url":"https://api.github.com/users/studio-net/followers","following_url":"https://api.github.com/users/studio-net/following{/other_user}","gists_url":"https://api.github.com/users/studio-net/gists{/gist_id}","starred_url":"https://api.github.com/users/studio-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studio-net/subscriptions","organizations_url":"https://api.github.com/users/studio-net/orgs","repos_url":"https://api.github.com/users/studio-net/repos","events_url":"https://api.github.com/users/studio-net/events{/privacy}","received_events_url":"https://api.github.com/users/studio-net/received_events","type":"Organization","site_admin":false},"repo":{"id":98440527,"node_id":"MDEwOlJlcG9zaXRvcnk5ODQ0MDUyNw==","name":"laravel-graphql","full_name":"studio-net/laravel-graphql","owner":{"login":"studio-net","id":7984160,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5ODQxNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/7984160?v=4","gravatar_id":"","url":"https://api.github.com/users/studio-net","html_url":"https://github.com/studio-net","followers_url":"https://api.github.com/users/studio-net/followers","following_url":"https://api.github.com/users/studio-net/following{/other_user}","gists_url":"https://api.github.com/users/studio-net/gists{/gist_id}","starred_url":"https://api.github.com/users/studio-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/studio-net/subscriptions","organizations_url":"https://api.github.com/users/studio-net/orgs","repos_url":"https://api.github.com/users/studio-net/repos","events_url":"https://api.github.com/users/studio-net/events{/privacy}","received_events_url":"https://api.github.com/users/studio-net/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/studio-net/laravel-graphql","description":"GraphQL implementation with power of Laravel","fork":false,"url":"https://api.github.com/repos/studio-net/laravel-graphql","forks_url":"https://api.github.com/repos/studio-net/laravel-graphql/forks","keys_url":"https://api.github.com/repos/studio-net/laravel-graphql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/studio-net/laravel-graphql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/studio-net/laravel-graphql/teams","hooks_url":"https://api.github.com/repos/studio-net/laravel-graphql/hooks","issue_events_url":"https://api.github.com/repos/studio-net/laravel-graphql/issues/events{/number}","events_url":"https://api.github.com/repos/studio-net/laravel-graphql/events","assignees_url":"https://api.github.com/repos/studio-net/laravel-graphql/assignees{/user}","branches_url":"https://api.github.com/repos/studio-net/laravel-graphql/branches{/branch}","tags_url":"https://api.github.com/repos/studio-net/laravel-graphql/tags","blobs_url":"https://api.github.com/repos/studio-net/laravel-graphql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/studio-net/laravel-graphql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/studio-net/laravel-graphql/git/refs{/sha}","trees_url":"https://api.github.com/repos/studio-net/laravel-graphql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/studio-net/laravel-graphql/statuses/{sha}","languages_url":"https://api.github.com/repos/studio-net/laravel-graphql/languages","stargazers_url":"https://api.github.com/repos/studio-net/laravel-graphql/stargazers","contributors_url":"https://api.github.com/repos/studio-net/laravel-graphql/contributors","subscribers_url":"https://api.github.com/repos/studio-net/laravel-graphql/subscribers","subscription_url":"https://api.github.com/repos/studio-net/laravel-graphql/subscription","commits_url":"https://api.github.com/repos/studio-net/laravel-graphql/commits{/sha}","git_commits_url":"https://api.github.com/repos/studio-net/laravel-graphql/git/commits{/sha}","comments_url":"https://api.github.com/repos/studio-net/laravel-graphql/comments{/number}","issue_comment_url":"https://api.github.com/repos/studio-net/laravel-graphql/issues/comments{/number}","contents_url":"https://api.github.com/repos/studio-net/laravel-graphql/contents/{+path}","compare_url":"https://api.github.com/repos/studio-net/laravel-graphql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/studio-net/laravel-graphql/merges","archive_url":"https://api.github.com/repos/studio-net/laravel-graphql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/studio-net/laravel-graphql/downloads","issues_url":"https://api.github.com/repos/studio-net/laravel-graphql/issues{/number}","pulls_url":"https://api.github.com/repos/studio-net/laravel-graphql/pulls{/number}","milestones_url":"https://api.github.com/repos/studio-net/laravel-graphql/milestones{/number}","notifications_url":"https://api.github.com/repos/studio-net/laravel-graphql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/studio-net/laravel-graphql/labels{/name}","releases_url":"https://api.github.com/repos/studio-net/laravel-graphql/releases{/id}","deployments_url":"https://api.github.com/repos/studio-net/laravel-graphql/deployments","created_at":"2017-07-26T15:50:38Z","updated_at":"2018-07-30T09:57:35Z","pushed_at":"2018-08-08T21:57:36Z","git_url":"git://github.com/studio-net/laravel-graphql.git","ssh_url":"git@github.com:studio-net/laravel-graphql.git","clone_url":"https://github.com/studio-net/laravel-graphql.git","svn_url":"https://github.com/studio-net/laravel-graphql","homepage":"https://github.com/studio-net/laravel-graphql/","size":347,"stargazers_count":49,"watchers_count":49,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":5,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27"},"html":{"href":"https://github.com/studio-net/laravel-graphql/pull/27"},"issue":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/issues/27"},"comments":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/studio-net/laravel-graphql/statuses/88ceb91f20a32bdf65387a37c8b5e696a16badfd"}},"author_association":"NONE"}}
{"actor":{"display_login":"cmizzi"}}