Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support executing queries from store #1514

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Conversation

Merkur39
Copy link
Member

@Merkur39 Merkur39 commented Aug 1, 2024

Small correction to #1511

@Merkur39 Merkur39 requested a review from zatteo August 1, 2024 14:20
@Merkur39 Merkur39 force-pushed the fix/executeQueryFromState branch 3 times, most recently from 2651ce8 to f334454 Compare August 6, 2024 08:39
To avoid circular dependencies, it's best to move
helpers from the `index` file to a new file and
then export these functions to the index.
packages/cozy-client/src/store/queries.js Outdated Show resolved Hide resolved
The `getCollectionFromSlice` helper expects an object
with doctypes as key.
However, the method `this.store.getState()` returns a
larger object such as
`{ cozy: { documents: { [doctype]: ... }, queries: {} }`.

In this case, the `client.getCollectionFromState` method
is more appropriate.
@Merkur39 Merkur39 merged commit 75d3228 into master Aug 7, 2024
4 checks passed
@Merkur39 Merkur39 deleted the fix/executeQueryFromState branch August 7, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants