-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
getOptimisticResponse does not seem to populate __typename
#618
Comments
@Globegitter thanks for filing this, see #621 for a fix |
josephsavona
added a commit
that referenced
this issue
Nov 23, 2015
Summary: Addresses #618 - developers shouldn't have to write `__typename`s for optimistic records. `RelayQueryWriter` already traverses *any* fragment when handling optimistic payloads, and the other place where we would use the type - the cache writer - doesn't receive optimistic writes either. Closes #621 Reviewed By: yungsters Differential Revision: D2679773 fb-gh-sync-id: 1a07c36085a5fc23df9b1cf0daab9b77336b0b91
@Globegitter thanks again for bringing this up! |
This was referenced Jul 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a mutation which returns an optimistic response as follows:
Which leads to:
'RelayQueryWriter: Could not find a type name for record
%s.',
here: 'RelayQueryWriter: Could not find a type name for record%s
.',When debugging I can see that the passed-in payload does not have a
__typename
. If I set it manually toCustomer
in thegetOptimisticResponse
the warning disappears.I am using a version from master with the commit id
090b2b1c1228fb3337d8af68648b34150da682e6
, so from about 2 days ago,The text was updated successfully, but these errors were encountered: