{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-python/graphene/issues/549","repository_url":"https://api.github.com/repos/graphql-python/graphene","labels_url":"https://api.github.com/repos/graphql-python/graphene/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/graphql-python/graphene/issues/549/comments","events_url":"https://api.github.com/repos/graphql-python/graphene/issues/549/events","html_url":"https://github.com/graphql-python/graphene/issues/549","id":259795139,"number":549,"title":"Playground uses Graphene 2.0, but example written for 1.0","user":{"login":"martinpeck","id":1524451,"avatar_url":"https://avatars3.githubusercontent.com/u/1524451?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpeck","html_url":"https://github.com/martinpeck","followers_url":"https://api.github.com/users/martinpeck/followers","following_url":"https://api.github.com/users/martinpeck/following{/other_user}","gists_url":"https://api.github.com/users/martinpeck/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpeck/subscriptions","organizations_url":"https://api.github.com/users/martinpeck/orgs","repos_url":"https://api.github.com/users/martinpeck/repos","events_url":"https://api.github.com/users/martinpeck/events{/privacy}","received_events_url":"https://api.github.com/users/martinpeck/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-22T12:12:50Z","updated_at":"2017-11-15T06:49:14Z","closed_at":"2017-11-15T06:49:14Z","author_association":"NONE","body":"Visitors to graphene.python.org are given the opportunity to use the Playground. When they do, they are presented with the following Python code...\r\n\r\n```python\r\nimport graphene\r\n\r\nclass Query(graphene.ObjectType):\r\n    hello = graphene.String()\r\n\r\n    def resolve_hello(self, args, context, info):\r\n        return 'World'\r\n\r\nschema = graphene.Schema(query=Query)\r\n```\r\n\r\nAs you can see, this resolver function takes 4 params.  \r\n\r\nWhen executed, the user is presented with the following result:\r\n\r\n```json\r\n{\r\n  \"errors\": [\r\n    {\r\n      \"message\": \"resolve_hello() takes exactly 4 arguments (2 given)\",\r\n      \"locations\": [\r\n        {\r\n          \"line\": 2,\r\n          \"column\": 3\r\n        }\r\n      ]\r\n    }\r\n  ],\r\n  \"data\": {\r\n    \"hello\": null\r\n  }\r\n}\r\n```\r\n\r\nI believe that this is because the example code is written against the 1.0 API, but the Playground is running against the 2.0 API. \r\n\r\nThis is a pretty poor initial experience of Graphene for new users, as it's not clear how to resolve the issue."},"comment":{"url":"https://api.github.com/repos/graphql-python/graphene/issues/comments/344501696","html_url":"https://github.com/graphql-python/graphene/issues/549#issuecomment-344501696","issue_url":"https://api.github.com/repos/graphql-python/graphene/issues/549","id":344501696,"user":{"login":"syrusakbary","id":188257,"avatar_url":"https://avatars2.githubusercontent.com/u/188257?v=4","gravatar_id":"","url":"https://api.github.com/users/syrusakbary","html_url":"https://github.com/syrusakbary","followers_url":"https://api.github.com/users/syrusakbary/followers","following_url":"https://api.github.com/users/syrusakbary/following{/other_user}","gists_url":"https://api.github.com/users/syrusakbary/gists{/gist_id}","starred_url":"https://api.github.com/users/syrusakbary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syrusakbary/subscriptions","organizations_url":"https://api.github.com/users/syrusakbary/orgs","repos_url":"https://api.github.com/users/syrusakbary/repos","events_url":"https://api.github.com/users/syrusakbary/events{/privacy}","received_events_url":"https://api.github.com/users/syrusakbary/received_events","type":"User","site_admin":false},"created_at":"2017-11-15T06:49:14Z","updated_at":"2017-11-15T06:49:14Z","author_association":"OWNER","body":"Closing as now the website have no playground (once it have it again, will be with the new syntax :) )"}}
{"actor":{"display_login":"syrusakbary"}}