-
Notifications
You must be signed in to change notification settings - Fork 787
Use standby fetchPolicy for recycled queries #671
Use standby fetchPolicy for recycled queries #671
Conversation
}); | ||
break; | ||
case 2: | ||
// // TODO: Proper assertions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@helfer I noticed that the recycled component is rendered twice after being recycled and rendered again. Is this to be expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends. Maybe it renders twice because it tries to do a network fetch? Or does it render twice with the same parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Props are visually identical but apollo data-functions are changed due to observableQueryFields
that seems to be invoked a couple of times between renders. I haven't studied that in detail but seems unrelated to this test-case.
I'm pretty happy with the current test case. Should be an easy fix once standby lands in apollo-client. |
@helfer I noticed that apollo-client with Should be ready to merge once rebased after react-apollo upgrades apollo-client. EDIT Hmm, also seems to pass above, the TS shouldn't compile? EDIT2 Ah, apollo-client is a caret range dep so it picks up the new apollo-client 👍 |
@jacobk can you rebase this, and update the changelog and package.json file to force ^1.1.2 of apollo-client? I'd love to merge this in and release it! Thank you for the great tests! |
@jbaxleyiii no problem! Should be done now. |
Nice, I'm looking forward to seeing this released in the wild @jacobk @jbaxleyiii ! |
See #622
TODO: