-
Notifications
You must be signed in to change notification settings - Fork 1.9k
__typename is null when an optimistic update is applied #1230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just to clarify, are you explicitly setting the |
No |
It does work when |
Yes, this is expected behavior. Relay can't know what type you meant to create within a union, so you have to specify it. It may be possible to infer the type in some cases that we don't today, but a union would always require it to be specified by the user. |
Going to close this out, but feel free to comment again @calebmer if you'd like to know more. Thanks for bringing this up. |
I have a
Node
that I want to update with an optimistic update, but thatNode
is also returned by a union so I need to get the__typename
from the union. However, it would appear that after an optimistic update has been applied and before the response comes back, the value of that__typename
on the union isnull
.The text was updated successfully, but these errors were encountered: