{"action":"created","issue":{"url":"https://api.github.com/repos/nuwave/lighthouse/issues/59","repository_url":"https://api.github.com/repos/nuwave/lighthouse","labels_url":"https://api.github.com/repos/nuwave/lighthouse/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/nuwave/lighthouse/issues/59/comments","events_url":"https://api.github.com/repos/nuwave/lighthouse/issues/59/events","html_url":"https://github.com/nuwave/lighthouse/issues/59","id":235825154,"number":59,"title":"RelayConnection::scopeGetConnection breaks seeders.","user":{"login":"hailwood","id":709773,"avatar_url":"https://avatars3.githubusercontent.com/u/709773?v=4","gravatar_id":"","url":"https://api.github.com/users/hailwood","html_url":"https://github.com/hailwood","followers_url":"https://api.github.com/users/hailwood/followers","following_url":"https://api.github.com/users/hailwood/following{/other_user}","gists_url":"https://api.github.com/users/hailwood/gists{/gist_id}","starred_url":"https://api.github.com/users/hailwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hailwood/subscriptions","organizations_url":"https://api.github.com/users/hailwood/orgs","repos_url":"https://api.github.com/users/hailwood/repos","events_url":"https://api.github.com/users/hailwood/events{/privacy}","received_events_url":"https://api.github.com/users/hailwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-14T09:55:38Z","updated_at":"2017-12-18T17:10:46Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### What is the issue?\r\n\r\nThe scope registered at \r\n[**nuwave/lighthouse:**/src/Support/Traits/RelayConnection.php#L18](https://github.com/nuwave/lighthouse/blob/master/src/Support/Traits/RelayConnection.php#L18) \r\nconflicts with a built in laravel method at \r\n[**laravel/framework:**/src/Illuminate/Database/Eloquent/Model.php#L1005](https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Model.php#L1005)\r\n\r\n\r\n### Suggested fix?\r\nso it looks like we need to change the scope name; \r\nMight I suggest we go with `scopeGetGraphQLConnection()`.\r\n\r\nFor consistency we should also rename `scopeLoadConnection()` to `scopeLoadGraphQLConnection()`.\r\n\r\nThese names are fairly precise but should avoid conflicts in the future as anything to do with `connection` seems to be quite dangerous grounds in Laravel.\r\n\r\nThoughts?\r\n\r\n### exact error message below for \"googlers\" sake\r\n> [Symfony\\Component\\Debug\\Exception\\FatalThrowableError]                                     \r\n>  Type error: Too few arguments to function App\\User::scopeGetConnection(), 1 passed in /var  \r\n>  /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php on line 930 and  \r\n>   exactly 2 expected\r\n\r\nNote that the error is actually triggered from the `factory(...)->create()` method, however these are normally only used in seeders."},"comment":{"url":"https://api.github.com/repos/nuwave/lighthouse/issues/comments/352491458","html_url":"https://github.com/nuwave/lighthouse/issues/59#issuecomment-352491458","issue_url":"https://api.github.com/repos/nuwave/lighthouse/issues/59","id":352491458,"user":{"login":"irakliOrbis","id":32687522,"avatar_url":"https://avatars3.githubusercontent.com/u/32687522?v=4","gravatar_id":"","url":"https://api.github.com/users/irakliOrbis","html_url":"https://github.com/irakliOrbis","followers_url":"https://api.github.com/users/irakliOrbis/followers","following_url":"https://api.github.com/users/irakliOrbis/following{/other_user}","gists_url":"https://api.github.com/users/irakliOrbis/gists{/gist_id}","starred_url":"https://api.github.com/users/irakliOrbis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irakliOrbis/subscriptions","organizations_url":"https://api.github.com/users/irakliOrbis/orgs","repos_url":"https://api.github.com/users/irakliOrbis/repos","events_url":"https://api.github.com/users/irakliOrbis/events{/privacy}","received_events_url":"https://api.github.com/users/irakliOrbis/received_events","type":"User","site_admin":false},"created_at":"2017-12-18T17:10:46Z","updated_at":"2017-12-18T17:10:46Z","author_association":"NONE","body":"I have the same error. How do you fix this?"}}
{"actor":{"display_login":"irakliOrbis"}}