{"action":"created","issue":{"url":"https://api.github.com/repos/prismake/typegql/issues/29","repository_url":"https://api.github.com/repos/prismake/typegql","labels_url":"https://api.github.com/repos/prismake/typegql/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/prismake/typegql/issues/29/comments","events_url":"https://api.github.com/repos/prismake/typegql/issues/29/events","html_url":"https://github.com/prismake/typegql/issues/29","id":326090384,"number":29,"title":"createSchema doesn't call constructor method","user":{"login":"snaquaye","id":190048,"avatar_url":"https://avatars1.githubusercontent.com/u/190048?v=4","gravatar_id":"","url":"https://api.github.com/users/snaquaye","html_url":"https://github.com/snaquaye","followers_url":"https://api.github.com/users/snaquaye/followers","following_url":"https://api.github.com/users/snaquaye/following{/other_user}","gists_url":"https://api.github.com/users/snaquaye/gists{/gist_id}","starred_url":"https://api.github.com/users/snaquaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snaquaye/subscriptions","organizations_url":"https://api.github.com/users/snaquaye/orgs","repos_url":"https://api.github.com/users/snaquaye/repos","events_url":"https://api.github.com/users/snaquaye/events{/privacy}","received_events_url":"https://api.github.com/users/snaquaye/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-24T12:04:00Z","updated_at":"2018-05-24T13:33:25Z","closed_at":null,"author_association":"NONE","body":"Constructor function is not called\r\n```\r\n// Import statements\r\n\r\n@Schema()\r\nclass RegistrationSchema {\r\n\r\n  constructor (private registrationService: RegistrationService) { }\r\n\r\n  @Query()\r\n  hello(me: string): string {\r\n    return 'hello world!';\r\n  }\r\n\r\n  @Mutation({ type: RegistrationType })\r\n  async registerUser(@Arg() newRegistrantData: RegistrationInputType): Promise<RegistrationType> {\r\n    const errors = await validate(newRegistrantData);\r\n\r\n    if (errors.length) {\r\n      throw SevenBoom.badRequest('Data sent to the sever failed validation', errors);\r\n    }\r\n\r\n    try {\r\n      await this.registrationService.registerUser(newRegistrantData);\r\n      return newRegistrantData;\r\n    } catch (error) {\r\n      throw SevenBoom.badImplementation('Internal Server Error', error);\r\n    }\r\n  }\r\n}\r\n\r\nconst compiledSchema = compileSchema(RegistrationSchema);\r\n\r\nexport default compiledSchema;\r\n```"},"comment":{"url":"https://api.github.com/repos/prismake/typegql/issues/comments/391716229","html_url":"https://github.com/prismake/typegql/issues/29#issuecomment-391716229","issue_url":"https://api.github.com/repos/prismake/typegql/issues/29","id":391716229,"user":{"login":"19majkel94","id":10618781,"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-05-24T13:33:25Z","updated_at":"2018-05-24T13:33:25Z","author_association":"NONE","body":"It might be related to #16 as you need dependency injection. If you need this, you might need to find a library that supports it:\r\nhttps://github.com/chentsulin/awesome-graphql#lib-ts"}}
{"actor":{"display_login":"19majkel94"}}