{"action":"created","issue":{"url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2172","repository_url":"https://api.github.com/repos/flow-typed/flow-typed","labels_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2172/labels{/name}","comments_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2172/comments","events_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2172/events","html_url":"https://github.com/flow-typed/flow-typed/pull/2172","id":320526494,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2MTY2Nzkx","number":2172,"title":"Apollo Client Libdef (also add to react-apollo)","user":{"login":"TLadd","id":5084492,"node_id":"MDQ6VXNlcjUwODQ0OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/5084492?v=4","gravatar_id":"","url":"https://api.github.com/users/TLadd","html_url":"https://github.com/TLadd","followers_url":"https://api.github.com/users/TLadd/followers","following_url":"https://api.github.com/users/TLadd/following{/other_user}","gists_url":"https://api.github.com/users/TLadd/gists{/gist_id}","starred_url":"https://api.github.com/users/TLadd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TLadd/subscriptions","organizations_url":"https://api.github.com/users/TLadd/orgs","repos_url":"https://api.github.com/users/TLadd/repos","events_url":"https://api.github.com/users/TLadd/events{/privacy}","received_events_url":"https://api.github.com/users/TLadd/received_events","type":"User","site_admin":false},"labels":[{"id":874822104,"node_id":"MDU6TGFiZWw4NzQ4MjIxMDQ=","url":"https://api.github.com/repos/flow-typed/flow-typed/labels/libdef","name":"libdef","color":"0052cc","default":false},{"id":890245506,"node_id":"MDU6TGFiZWw4OTAyNDU1MDY=","url":"https://api.github.com/repos/flow-typed/flow-typed/labels/new","name":"new","color":"246591","default":false},{"id":425923521,"node_id":"MDU6TGFiZWw0MjU5MjM1MjE=","url":"https://api.github.com/repos/flow-typed/flow-typed/labels/work-in-progress","name":"work-in-progress","color":"aa40ff","default":false}],"state":"closed","locked":false,"assignee":{"login":"GAntoine","id":3247106,"node_id":"MDQ6VXNlcjMyNDcxMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3247106?v=4","gravatar_id":"","url":"https://api.github.com/users/GAntoine","html_url":"https://github.com/GAntoine","followers_url":"https://api.github.com/users/GAntoine/followers","following_url":"https://api.github.com/users/GAntoine/following{/other_user}","gists_url":"https://api.github.com/users/GAntoine/gists{/gist_id}","starred_url":"https://api.github.com/users/GAntoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAntoine/subscriptions","organizations_url":"https://api.github.com/users/GAntoine/orgs","repos_url":"https://api.github.com/users/GAntoine/repos","events_url":"https://api.github.com/users/GAntoine/events{/privacy}","received_events_url":"https://api.github.com/users/GAntoine/received_events","type":"User","site_admin":false},"assignees":[{"login":"GAntoine","id":3247106,"node_id":"MDQ6VXNlcjMyNDcxMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3247106?v=4","gravatar_id":"","url":"https://api.github.com/users/GAntoine","html_url":"https://github.com/GAntoine","followers_url":"https://api.github.com/users/GAntoine/followers","following_url":"https://api.github.com/users/GAntoine/following{/other_user}","gists_url":"https://api.github.com/users/GAntoine/gists{/gist_id}","starred_url":"https://api.github.com/users/GAntoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAntoine/subscriptions","organizations_url":"https://api.github.com/users/GAntoine/orgs","repos_url":"https://api.github.com/users/GAntoine/repos","events_url":"https://api.github.com/users/GAntoine/events{/privacy}","received_events_url":"https://api.github.com/users/GAntoine/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-05-05T17:23:01Z","updated_at":"2018-08-02T21:51:08Z","closed_at":"2018-05-14T23:27:14Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2172","html_url":"https://github.com/flow-typed/flow-typed/pull/2172","diff_url":"https://github.com/flow-typed/flow-typed/pull/2172.diff","patch_url":"https://github.com/flow-typed/flow-typed/pull/2172.patch"},"body":"- [x] Add some more tests\r\n- [x] Resolve interop with the current react-apollo libdef. \r\n\r\nIt seems that since the react-apollo libdef is importing types from apollo-client (which doesn't have types), even if I include this apollo-client libdef in my project, types that react-apollo imports end up getting clobbered to any. Either need to \r\n\r\n1. stop importing those types in react-apollo libdef or \r\n2. actually use the types added here.\r\n\r\nActually using the types is definitely the endgame, but might be a large effort that could be split to another PR.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/flow-typed/flow-typed/issues/comments/410078932","html_url":"https://github.com/flow-typed/flow-typed/pull/2172#issuecomment-410078932","issue_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2172","id":410078932,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDA3ODkzMg==","user":{"login":"TLadd","id":5084492,"node_id":"MDQ6VXNlcjUwODQ0OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/5084492?v=4","gravatar_id":"","url":"https://api.github.com/users/TLadd","html_url":"https://github.com/TLadd","followers_url":"https://api.github.com/users/TLadd/followers","following_url":"https://api.github.com/users/TLadd/following{/other_user}","gists_url":"https://api.github.com/users/TLadd/gists{/gist_id}","starred_url":"https://api.github.com/users/TLadd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TLadd/subscriptions","organizations_url":"https://api.github.com/users/TLadd/orgs","repos_url":"https://api.github.com/users/TLadd/repos","events_url":"https://api.github.com/users/TLadd/events{/privacy}","received_events_url":"https://api.github.com/users/TLadd/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T21:51:08Z","updated_at":"2018-08-02T21:51:08Z","author_association":"CONTRIBUTOR","body":"I believe this has always been the case (you still get an error if you select older versions of flow as well).\r\n\r\nI'm typically checking that values are present when I'm accessing them, and it removes the type errors. This works for instance:\r\n```\r\ntype Data = {foo: number} | {||}\r\n\r\nfunction getFoo(data: Data): ?number {\r\n  if (data.foo) {\r\n  \treturn data.foo \r\n  }\r\n  return null\r\n}\r\n```\r\n\r\nHaving said that, it may be reasonable to change data to just be `TData | void`. The `| {||}`, while correct, doesn't buy much."}}
{"actor":{"display_login":"TLadd"}}