Skip to content
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

Merged
merged 1 commit into from
Jan 13, 2017
Merged

Only checking graphql vars to change before reissuing query #117

merged 1 commit into from
Jan 13, 2017

Conversation

ilyabo
Copy link

@ilyabo ilyabo commented Jan 10, 2017

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).

@gyzerok
Copy link
Owner

gyzerok commented Jan 13, 2017

Hello @ilyabo!

Thank you for your PR and sorry for me being a bit slow. These changes make a lot of sense to me, so let's merge them! :)

@gyzerok gyzerok merged commit 88e3dab into gyzerok:master Jan 13, 2017
@ilyabo
Copy link
Author

ilyabo commented Jan 13, 2017

Cool! Thanks!

@gyzerok
Copy link
Owner

gyzerok commented Jan 13, 2017

@ilyabo and new version has been released, so you can switch to use it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants