{"action":"opened","issue":{"url":"https://api.github.com/repos/apollographql/react-apollo/issues/2183","repository_url":"https://api.github.com/repos/apollographql/react-apollo","labels_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2183/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2183/comments","events_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2183/events","html_url":"https://github.com/apollographql/react-apollo/issues/2183","id":341166789,"node_id":"MDU6SXNzdWUzNDExNjY3ODk=","number":2183,"title":"Type of props in ","user":{"login":"dobesv","id":327833,"node_id":"MDQ6VXNlcjMyNzgzMw==","avatar_url":"https://avatars2.githubusercontent.com/u/327833?v=4","gravatar_id":"","url":"https://api.github.com/users/dobesv","html_url":"https://github.com/dobesv","followers_url":"https://api.github.com/users/dobesv/followers","following_url":"https://api.github.com/users/dobesv/following{/other_user}","gists_url":"https://api.github.com/users/dobesv/gists{/gist_id}","starred_url":"https://api.github.com/users/dobesv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobesv/subscriptions","organizations_url":"https://api.github.com/users/dobesv/orgs","repos_url":"https://api.github.com/users/dobesv/repos","events_url":"https://api.github.com/users/dobesv/events{/privacy}","received_events_url":"https://api.github.com/users/dobesv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-13T21:36:44Z","updated_at":"2018-07-13T21:36:44Z","closed_at":null,"author_association":"NONE","body":"When providing a `props` function to the `graphql` function, the return type of `props` is `TChildProps`, which means the function must return *all* props in `TChildProps` to avoid type errors.  However, the implementation actually merges the existing props in `TProps` with any newly added props returned by `props`.  Thus, the return type of `props` should be setup such that any props already in `TProps` are optional as they will be passed through.  Only attributes of `TChildProps` not in `TProps` should be required in the return type.\r\n\r\nI'm not 100% sure what typescript magic is required to make this work, though.\r\n\r\nAs a workaround, I separated `TProps` and `TChildProps` completely and recombined them when I created the component using `&`, e.g. `class X extends React.Component<TProps & TChildProps>`.\r\n\r\n"}}
{"actor":{"display_login":"dobesv"}}