{"action":"created","issue":{"url":"https://api.github.com/repos/19majkel94/type-graphql/issues/126","repository_url":"https://api.github.com/repos/19majkel94/type-graphql","labels_url":"https://api.github.com/repos/19majkel94/type-graphql/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/19majkel94/type-graphql/issues/126/comments","events_url":"https://api.github.com/repos/19majkel94/type-graphql/issues/126/events","html_url":"https://github.com/19majkel94/type-graphql/issues/126","id":350351112,"node_id":"MDU6SXNzdWUzNTAzNTExMTI=","number":126,"title":"ObjectType field with same type?","user":{"login":"miro4994","id":10854425,"node_id":"MDQ6VXNlcjEwODU0NDI1","avatar_url":"https://avatars2.githubusercontent.com/u/10854425?v=4","gravatar_id":"","url":"https://api.github.com/users/miro4994","html_url":"https://github.com/miro4994","followers_url":"https://api.github.com/users/miro4994/followers","following_url":"https://api.github.com/users/miro4994/following{/other_user}","gists_url":"https://api.github.com/users/miro4994/gists{/gist_id}","starred_url":"https://api.github.com/users/miro4994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miro4994/subscriptions","organizations_url":"https://api.github.com/users/miro4994/orgs","repos_url":"https://api.github.com/users/miro4994/repos","events_url":"https://api.github.com/users/miro4994/events{/privacy}","received_events_url":"https://api.github.com/users/miro4994/received_events","type":"User","site_admin":false},"labels":[{"id":835300796,"node_id":"MDU6TGFiZWw4MzUzMDA3OTY=","url":"https://api.github.com/repos/19majkel94/type-graphql/labels/Needs%20More%20Info%20:man_shrugging:","name":"Needs More Info :man_shrugging:","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-14T09:34:26Z","updated_at":"2018-08-18T08:40:24Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nHey, I don't know if its a bug or not. but i would like to have some child types same as parent, for example: I have a CategoryType, which has childCategories field that returns list of CategoryType but it throws an error ``CategoryType is not defined``\r\n\r\n**To Reproduce**\r\nTry to create a type like this which has a field that returns a list of same type.\r\n```\r\n@ObjectType()\r\nexport class CategoryType {\r\n  @Field(type => [CategoryType])\r\n  childCategories: CategoryType[];\r\n} \r\n```\r\n**Expected behavior**\r\nThere must be some way how to do this.  Any help or workaround?\r\n\r\n**Enviorment (please complete the following information):**\r\n - OS: Windows\r\n - Node 8.9.4\r\n - Package version 0.13.0\r\n - TypeScript version 2.9.2\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/19majkel94/type-graphql/issues/comments/414042183","html_url":"https://github.com/19majkel94/type-graphql/issues/126#issuecomment-414042183","issue_url":"https://api.github.com/repos/19majkel94/type-graphql/issues/126","id":414042183,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDA0MjE4Mw==","user":{"login":"19majkel94","id":10618781,"node_id":"MDQ6VXNlcjEwNjE4Nzgx","avatar_url":"https://avatars1.githubusercontent.com/u/10618781?v=4","gravatar_id":"","url":"https://api.github.com/users/19majkel94","html_url":"https://github.com/19majkel94","followers_url":"https://api.github.com/users/19majkel94/followers","following_url":"https://api.github.com/users/19majkel94/following{/other_user}","gists_url":"https://api.github.com/users/19majkel94/gists{/gist_id}","starred_url":"https://api.github.com/users/19majkel94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/19majkel94/subscriptions","organizations_url":"https://api.github.com/users/19majkel94/orgs","repos_url":"https://api.github.com/users/19majkel94/repos","events_url":"https://api.github.com/users/19majkel94/events{/privacy}","received_events_url":"https://api.github.com/users/19majkel94/received_events","type":"User","site_admin":false},"created_at":"2018-08-18T08:40:24Z","updated_at":"2018-08-18T08:40:24Z","author_association":"OWNER","body":"I bet the problem is with babel - first, you don't need this when you use TypeScript (it's type checker and compiler in one), second, `@babel/plugin-proposal-decorators` is for newer propsal of decorators that's not compatible with current TypeScript one."}}
{"actor":{"display_login":"19majkel94"}}