{"action":"created","issue":{"url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/454","repository_url":"https://api.github.com/repos/rmosolgo/graphql-ruby","labels_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/454/comments","events_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/454/events","html_url":"https://github.com/rmosolgo/graphql-ruby/issues/454","id":194805079,"number":454,"title":"Provide a definition API that doesn't instance_eval","user":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars0.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":true},"labels":[{"id":173864926,"url":"https://api.github.com/repos/rmosolgo/graphql-ruby/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-11T01:11:35Z","updated_at":"2017-07-13T20:54:16Z","closed_at":"2017-07-13T20:54:16Z","body":"`.define` hijacks the lexical scope, resulting in weirdness:\r\n\r\n- Loss of outer `self`, uh, \"obviously\"\r\n- Confusing `NoMethodError` if you make a typo when referencing a local variable \r\n\r\nHowever, it makes an API that's pretty _on paper_. \r\n\r\nCould we make an equally easy API for schema definition that doesn't require the bait-and-switch of `instance_eval`? \r\n\r\nOne point: `types.String` is the same as `GraphQL::STRING_TYPE`. One option would be to make those constants more user-friendly and suggest people to use them instead of `types.` helpers."},"comment":{"url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/comments/315199244","html_url":"https://github.com/rmosolgo/graphql-ruby/issues/454#issuecomment-315199244","issue_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/454","id":315199244,"user":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars0.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":true},"created_at":"2017-07-13T20:54:16Z","updated_at":"2017-07-13T20:54:16Z","body":"I'm closing this as superseded by #727  or #820 "}}
{"actor":{"display_login":"rmosolgo"}}