This repository has been archived by the owner on Dec 31, 2018. It is now read-only.
Only checking graphql vars to change before reissuing query #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We use Adrenaline to wrap views in a dashboard. These views usually take many props most of which are irrelevant to the API calls. That is, changes in these props don't require re-fetching (e.g. the width and the height of a view). Currently, Adrenaline fetches upon each prop change in a component. This behavior is a show-stopper for us. Currently, there is no way to change it through the API Adrenaline exposes.
I think by default Adrenaline should only re-fetch upon changes in GraphQL vars. This is what this pull request proposes.
(Admittedly, in some situations it might still be useful to have a way to force a re-fetch or to have re-fetches on each prop change. If that's true, the re-fetch behavior could be made configurable e.g. via the spec).