{"action":"created","issue":{"url":"https://api.github.com/repos/cristianoc/genType/issues/64","repository_url":"https://api.github.com/repos/cristianoc/genType","labels_url":"https://api.github.com/repos/cristianoc/genType/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/cristianoc/genType/issues/64/comments","events_url":"https://api.github.com/repos/cristianoc/genType/issues/64/events","html_url":"https://github.com/cristianoc/genType/issues/64","id":371908153,"node_id":"MDU6SXNzdWUzNzE5MDgxNTM=","number":64,"title":"Exposing module types","user":{"login":"MarcelCutts","id":5721314,"node_id":"MDQ6VXNlcjU3MjEzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5721314?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelCutts","html_url":"https://github.com/MarcelCutts","followers_url":"https://api.github.com/users/MarcelCutts/followers","following_url":"https://api.github.com/users/MarcelCutts/following{/other_user}","gists_url":"https://api.github.com/users/MarcelCutts/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelCutts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelCutts/subscriptions","organizations_url":"https://api.github.com/users/MarcelCutts/orgs","repos_url":"https://api.github.com/users/MarcelCutts/repos","events_url":"https://api.github.com/users/MarcelCutts/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelCutts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-19T10:57:49Z","updated_at":"2018-10-24T16:59:27Z","closed_at":null,"author_association":"NONE","body":"I've been experimenting with mixing ReasonML and regular JS to provide a solid foundation across side effects.\r\n\r\nOne thing that I would find amazingly useful is being able to run `genType` on types within instantiated modules so I can expose those to regular `flow`d components\r\n\r\nA reason-apollo example\r\n\r\n```ocaml\r\n[@genType]\r\nmodule GetUser = [%graphql\r\n  {| query getUser { user { firstName, lastName, telephone } }|}\r\n];\r\n\r\nmodule GetUserQuery = ReasonApollo.CreateQuery(GetUser);\r\n\r\n[@genType]\r\ntype responseType = GetUser.t;\r\n```\r\n\r\nHere responseType ends up being\r\n\r\n```js\r\nexport opaque type responseType = GetUser_t;\r\n```\r\n\r\nwhere `GetUser_t` cannot be resolved.\r\n\r\nIs this something that's on the roadmap? Or is it one of those things that is actually rather difficult?"},"comment":{"url":"https://api.github.com/repos/cristianoc/genType/issues/comments/432741821","html_url":"https://github.com/cristianoc/genType/issues/64#issuecomment-432741821","issue_url":"https://api.github.com/repos/cristianoc/genType/issues/64","id":432741821,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjc0MTgyMQ==","user":{"login":"MarcelCutts","id":5721314,"node_id":"MDQ6VXNlcjU3MjEzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5721314?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcelCutts","html_url":"https://github.com/MarcelCutts","followers_url":"https://api.github.com/users/MarcelCutts/followers","following_url":"https://api.github.com/users/MarcelCutts/following{/other_user}","gists_url":"https://api.github.com/users/MarcelCutts/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelCutts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelCutts/subscriptions","organizations_url":"https://api.github.com/users/MarcelCutts/orgs","repos_url":"https://api.github.com/users/MarcelCutts/repos","events_url":"https://api.github.com/users/MarcelCutts/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelCutts/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T16:59:27Z","updated_at":"2018-10-24T16:59:27Z","author_association":"NONE","body":"No luck yet but it feels tantalisingly close. Our original use case is still not quite good to go.\r\n\r\n```ocaml\r\nmodule GetUser = [%graphql\r\n  {| query getUser { user { firstName, lastName, telephone } }|}\r\n];\r\n\r\nmodule GetUserQuery = ReasonApollo.CreateQuery(GetUser);\r\n\r\n[@genType]\r\ntype responseType = GetUser.t;\r\n```\r\n\r\n```js\r\nimport type {t as MT_Ret_t} from './MT_Ret.re';\r\n\r\nexport opaque type GetUser_t = mixed;\r\n\r\nexport type responseType = GetUser_t;\r\n```\r\n\r\nI haven't quite been able to figure out why this one doesn't work but my test case (even when split across files) work great.\r\n\r\nI will spend a bit of effort trying to understand and create a suitable trimmed down test case."}}
{"actor":{"display_login":"MarcelCutts"}}