{"action":"opened","issue":{"url":"https://api.github.com/repos/dotansimha/graphql-code-generator/issues/1900","repository_url":"https://api.github.com/repos/dotansimha/graphql-code-generator","labels_url":"https://api.github.com/repos/dotansimha/graphql-code-generator/issues/1900/labels{/name}","comments_url":"https://api.github.com/repos/dotansimha/graphql-code-generator/issues/1900/comments","events_url":"https://api.github.com/repos/dotansimha/graphql-code-generator/issues/1900/events","html_url":"https://github.com/dotansimha/graphql-code-generator/issues/1900","id":446365567,"node_id":"MDU6SXNzdWU0NDYzNjU1Njc=","number":1900,"title":"Enum key starting with underscore is not generated correctly","user":{"login":"chengjia0807","id":43606717,"node_id":"MDQ6VXNlcjQzNjA2NzE3","avatar_url":"https://avatars1.githubusercontent.com/u/43606717?v=4","gravatar_id":"","url":"https://api.github.com/users/chengjia0807","html_url":"https://github.com/chengjia0807","followers_url":"https://api.github.com/users/chengjia0807/followers","following_url":"https://api.github.com/users/chengjia0807/following{/other_user}","gists_url":"https://api.github.com/users/chengjia0807/gists{/gist_id}","starred_url":"https://api.github.com/users/chengjia0807/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chengjia0807/subscriptions","organizations_url":"https://api.github.com/users/chengjia0807/orgs","repos_url":"https://api.github.com/users/chengjia0807/repos","events_url":"https://api.github.com/users/chengjia0807/events{/privacy}","received_events_url":"https://api.github.com/users/chengjia0807/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-05-21T00:31:13Z","updated_at":"2019-05-21T00:31:13Z","closed_at":null,"author_association":"NONE","body":"Now it's generated this which is wrong:\r\n\r\n```export enum AgeEnum {\r\n  LessThan19 = 'LessThan19',\r\n  20to24 = '_20to24',\r\n  25to29 = '_25to29',\r\n  30to34 = '_30to34',\r\n  35to39 = '_35to39',\r\n  40to44 = '_40to44',\r\n  45to49 = '_45to49',\r\n  50to54 = '_50to54',\r\n  55to59 = '_55to59',\r\n  60to64 = '_60to64',\r\n  65to74 = '_65to74',\r\n  75to84 = '_75to84',\r\n  85AndOver = '_85AndOver'\r\n}```\r\n\r\nThe correct one should be\r\n\r\n```export enum AgeEnum {\r\n  _LessThan19 = 'LessThan19',\r\n  _20to24\" = '_20to24',\r\n  _25to29\" = '_25to29',\r\n  _30to34 = '_30to34',\r\n  _35to39 = '_35to39',\r\n   ...\r\n}```\r\n\r\nbasically we need to keep the underscore because the enum key cannot be a number.\r\n\r\nHope can be fixed in short. :) \r\n\r\nGreat work guys\r\n\r\nThanks\r\nCJ"}}
{"actor":{"display_login":"chengjia0807"}}