Closed sneyderdev closed 2 months ago
Good catch - answering in the PR :)
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. For general questions, we recommend using StackOverflow or our discord server.
Issue Description
There's a type error when returning the
IGNORE
sentinel object fromoptimisticResponse
that is inferring from aTypedDocumentNode<>
.Given the following document:
We get the following type error:
I've checked the type definitions and it's fixed if we explicitly return an union type instead of only returning the inferred type. I created a PR #11944 changing this.
Link to Reproduction
https://codesandbox.io/p/sandbox/optimisticresponse-apollo-ts-error-mv34ws
Reproduction Steps
No response
@apollo/client
version3.10.8