You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
The types are defined twice, in both react-apollo and apollo-client 😱
How to reproduce the issue:
This is a basic example. With the update previousQueryResult should be typed as PersonQueryResult. See this apollo-client issue: apollographql/apollo-client#3391
constGET_PERSON=gql` { person { id name } }`;interfacePersonQueryResult{person: {name: string;}}classPersonQueryextendsQuery<PersonQueryResult>{};classMyComponentextendsReact.Component{render(){return<PersonQueryquery={GET_PERSON}>{({ subscribeToMore })=>{subscribeToMore({document: GET_PERSON,updateQuery: (previousQueryResult)=>{returnpreviousQueryResult;}});return<div/>;
}}</PersonQuery>}}
Intended outcome:
react-apollo
uses the types defined inapollo-client
added in Improved type definitions for the observable query apollo-client#3140Actual outcome:
react-apollo
andapollo-client
😱How to reproduce the issue:
This is a basic example. With the update
previousQueryResult
should be typed asPersonQueryResult
. See thisapollo-client
issue: apollographql/apollo-client#3391Relevant PRs:
The text was updated successfully, but these errors were encountered: