{"action":"created","issue":{"url":"https://api.github.com/repos/avantcredit/gql2ts/issues/6","repository_url":"https://api.github.com/repos/avantcredit/gql2ts","labels_url":"https://api.github.com/repos/avantcredit/gql2ts/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/avantcredit/gql2ts/issues/6/comments","events_url":"https://api.github.com/repos/avantcredit/gql2ts/issues/6/events","html_url":"https://github.com/avantcredit/gql2ts/issues/6","id":183264954,"number":6,"title":"Feature: Add enum support","user":{"login":"davidyaha","id":2580920,"avatar_url":"https://avatars.githubusercontent.com/u/2580920?v=3","gravatar_id":"","url":"https://api.github.com/users/davidyaha","html_url":"https://github.com/davidyaha","followers_url":"https://api.github.com/users/davidyaha/followers","following_url":"https://api.github.com/users/davidyaha/following{/other_user}","gists_url":"https://api.github.com/users/davidyaha/gists{/gist_id}","starred_url":"https://api.github.com/users/davidyaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidyaha/subscriptions","organizations_url":"https://api.github.com/users/davidyaha/orgs","repos_url":"https://api.github.com/users/davidyaha/repos","events_url":"https://api.github.com/users/davidyaha/events{/privacy}","received_events_url":"https://api.github.com/users/davidyaha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-16T12:39:32Z","updated_at":"2016-10-17T00:08:08Z","closed_at":null,"body":"Currently the code does not handle GraphQL Enums. I think the wanted generator is a string literal union.\r\nFor example, the following enum:\r\n```graphql\r\nenum UserType {\r\n  ADMIN\r\n  SELLER\r\n  CUSTOMER\r\n}\r\n```\r\n\r\nWill become:\r\n```typescript\r\nexport type UserType = 'ADMIN' | 'SELLER' | 'CUSTOMER';\r\n```\r\n\r\n@brettjurgens  LMK if this a good option in you opinion.\r\n\r\nThanks ahead!"},"comment":{"url":"https://api.github.com/repos/avantcredit/gql2ts/issues/comments/254086952","html_url":"https://github.com/avantcredit/gql2ts/issues/6#issuecomment-254086952","issue_url":"https://api.github.com/repos/avantcredit/gql2ts/issues/6","id":254086952,"user":{"login":"brettjurgens","id":1226910,"avatar_url":"https://avatars.githubusercontent.com/u/1226910?v=3","gravatar_id":"","url":"https://api.github.com/users/brettjurgens","html_url":"https://github.com/brettjurgens","followers_url":"https://api.github.com/users/brettjurgens/followers","following_url":"https://api.github.com/users/brettjurgens/following{/other_user}","gists_url":"https://api.github.com/users/brettjurgens/gists{/gist_id}","starred_url":"https://api.github.com/users/brettjurgens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettjurgens/subscriptions","organizations_url":"https://api.github.com/users/brettjurgens/orgs","repos_url":"https://api.github.com/users/brettjurgens/repos","events_url":"https://api.github.com/users/brettjurgens/events{/privacy}","received_events_url":"https://api.github.com/users/brettjurgens/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T00:08:08Z","updated_at":"2016-10-17T00:08:08Z","body":"I like this idea, I can probably take a look tomorrow at implementing it or would accept a PR!\r\n\r\nBeen meaning to add some updates for TS2 (adding null types, etc)"}}
{"actor":{"display_login":"brettjurgens"}}