cult-of-coders / grapher-react

Provides easy to use React Components that are suitable for grapher package.
https://atmospherejs.com/cultofcoders/grapher-react
39 stars 19 forks source link

Add support for loadOnRefetch option #32

Closed Floriferous closed 5 years ago

Floriferous commented 5 years ago

We're regularly refetching static queries to make our UIs more snappy, and the loading that appears every time you refetch is preventing us from making it feel live.

This adds a configuration option called loadOnRefetch that is true by default (to keep it backwards compatible) but can be set to false, where calling refetch will not trigger isLoading.

Todo:

Let me know if you're ok with adding this.

theodorDiaconu commented 5 years ago

@Floriferous thanks! Document the feature and it will be merged asap.

Floriferous commented 5 years ago

@theodorDiaconu Done!

theodorDiaconu commented 5 years ago

Just FYI:

While selecting package versions:
error: Conflict: Constraint peerlibrary:subscription-scope@0.4.0 is not satisfied by peerlibrary:subscription-scope 0.1.0.
Constraints on package "peerlibrary:subscription-scope":
* peerlibrary:subscription-scope@0.4.0 <- cultofcoders:grapher 1.3.9_3
* peerlibrary:subscription-scope@0.4.0 <- cultofcoders:grapher-react 0.1.4

This is preventing me to publish. I have no clue.

Floriferous commented 5 years ago

Shouldn't be due to this PR though right? Could it be coffeescript 1.x somehow?

Floriferous commented 5 years ago

@theodorDiaconu I think it might be practicalmeteor:chai, which is used in package.js. Grapher does not have it, and just uses chai. Could that solve the issue?