-
Notifications
You must be signed in to change notification settings - Fork 787
Query strange behavior - unlimited loading state after success mutation #368
Comments
I think i have same issue with #361 |
Any ideas? |
@ARMGAMES this looks like it could be a bug in apollo-client. Would you mind opening the issue there and make sure it occurs with the latest version of apollo-client? (it probably does) |
I'm currently battling, I think, the same issue. Could you try querying the whole SpeakerFragment in your mutation? Like
This worked for me, at least apollo-client didn't crash anymore. I don't consider this a fix though, since querying partial information here should be possible. |
Created issue at apollo - apollographql/apollo-client#1039 |
I'm also encountering weird behaviors around the |
@jbuchermn I can confirm that the problem comes from using partial fragments and is fixed by using the entire fragment. To clarify, I'm using a reducer to optimistically insert the results from a new mutation. When the new mutation returns a partial fragment (compared to the other documents in the list which were previously loaded from the server), the reducer's return value is never passed to the returned When the new mutation returns a full fragment, everything works properly. |
Closing this issue now that we're tracking it in apollographql/apollo-client#1039 |
I have a simple react component that connect to graphql query and all works fine untill i add new element to my db with mutation.
my simple react component - SpeakerList
I add new element with modal window that i make with component that i connect with that.
Mutation works fine even updateQueries runs and adding new element to array, but when i close modal window i has my Query element at unlimited loading state. I show that at screenshot.
QuerySpeakerList
SpeakerFragment
MutationAddSpeaker
What i do wrong?
Version
The text was updated successfully, but these errors were encountered: