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
There's a type error when returning the IGNORE sentinel object from optimisticResponse that is inferring from a TypedDocumentNode<>.
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.
sneyderdev
changed the title
Type error returning IGNORE object when using a generic TypedDocumentedNode mutation
Type error returning IGNORE object when using a generic TypedDocumentNode mutation
Jul 10, 2024
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
The text was updated successfully, but these errors were encountered: