-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Query strange behavior - unlimited loading state after success mutation with react-apollo #1039
Comments
@SachaG mentioned in the other issue that he has tracked this down to partial data being provided to the reducer. I think we currently throw an error if there's partial data outside a fragment, but we don't do so when partial data is inside a fragment due to how we detect fragments. I think a refactor will be needed to make sure that we can catch missing data in fragments as well. |
I thought #980 fixed this. I'm having trouble with this too. {"variables":{},"loading":false,"networkStatus":7,"foodtrucks":[{"name":"FoodTruck #1","__typename":"FoodTruck"},{"name":"FoodTruck #2","__typename":"FoodTruck"}]} but my app crashes with an odd error.
|
@donedgardo #980 was a fix for a different issue. I'm not sure your error is related since it indicates loading: false. It's a bit hard to tell what your error is, because it doesn't include a stack trace. Did you forget to paste it, or is there just no stack trace? |
My issue was isolated, i got it fixed, sorry and thanks.
…On Wednesday, December 21, 2016, Jonas Helfer ***@***.***> wrote:
@donedgardo <https://github.com/donedgardo> #980
<#980> was a fix for a
different issue. I'm not sure your error is related since it indicates
loading: false. It's a bit hard to tell what your error is, because it
doesn't include a stack trace. Did you forget to paste it, or is there just
no stack trace?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1039 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACXlUJybLtm4ppSdwAdtd87bJRraRKCUks5rKK78gaJpZM4LMjI->
.
|
Ran into a similar (or same) bug recently and was planning to open an issue. If I use $unshift it works fine (prepends item to list) but $push (to append) has me stuck in loading state. |
Okay yes I believe my issue is related to the partial result bug. I have this query:
and the mutation only returns So mutations can't work with Apollo if we want to use edges? |
@scf I'm sorry, I can't really tell what your issue/question is. From experience, it seems that unlimited loading state is often the result of a If it's indeed the case that the only difference is $unshift vs. $push, then it would be great if you could make a PR with a failing test. Just find the current test most relevant to your issue, copy, rename and adapt it to fail when using $push, but pass when using $unshift. |
Is anyone still encountering this issue? If yes, please let me know and I'll reopen the issue. |
Checked Network tab, and response from the server is correct, but This happens the third time I load a component that gets a query. |
Created issue at react-apollo, but there guys suggested that this apollo bug. This is issue link -apollographql/react-apollo#368
The text was updated successfully, but these errors were encountered: