Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Add delaySelfUpdate prop to client types defs, use to delay updates #146

Open
doug-patterson opened this issue Mar 30, 2021 · 2 comments
Open
Assignees

Comments

@doug-patterson
Copy link
Contributor

https://github.com/smartprocure/contexture-client/blob/master/src/index.js#L118 -- need to be able to delay the update if the node asks for it. Issue is tagsQuery, which doesn't make sense to update immediately the way pagination, etc work

@doug-patterson
Copy link
Contributor Author

@daedalus28 we may want to close this in favor of a more comprehensive issue, as discussed

@daedalus28
Copy link
Member

Current thinking is that we might want to make it so dispatches that affect their target nodes trigger an update of just that node instead of the entire tree instead of specifying it on a per reactor/field basis.

Alternatively, we would extend reactors to include a "forceUpdate" flag concept.

Option 1 is more magic but might be the right kind as it also improves performance (since clicking show more on a facet would no longer implicit update stale results).
Option 2 is more explicit but also much large impact (and has the same performance profile as before). The likely approach here would be to bundle the returned nodes and forceUpdate into the return value of the reactor so you can override that behavior for more internal things like changing group joins.

I suspect we're gonna go with the first option.

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

No branches or pull requests

2 participants