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

Store find getter cannot filter complex $modify query implemented on server #591

Open
EmileSpecs opened this issue Apr 14, 2021 · 0 comments

Comments

@EmileSpecs
Copy link

Hi!

I'm using feathers-objection on the server side and using a modifier for a complex filtering task. It returns the correct data from the server, but the fetchParams for the store has no concept of how the modifier works so it simply returns all the data in the find getter.

How do I get the Vuex store find getter to filter the data, or can I just simply tell it to always use all the data returned from the server?

The modifier looks like this on the client inside the fetchParams:

if (this.attrA || this.attrB || this.attrC) {
  query.$modify = {
    attributeFiltered: [this.attrC || this.attrB || this.attrA]
  }
}

What is basically does on the server is find all children of a parent attribute, so the attribute id is sent to the server and it recursively finds all the child attributes. The attributes simply have a parent_id column in the same attribute table.

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

No branches or pull requests

1 participant