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

Query relations #3

Closed
ps73 opened this issue Jan 8, 2022 · 1 comment
Closed

Query relations #3

ps73 opened this issue Jan 8, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ps73
Copy link
Owner

ps73 commented Jan 8, 2022

It would be nice if we cannot just load relations via $eager but also query the related items with default feathers query and filter options.

Could look like this:

app.service('users').find({
  query: {
    $eager: {
      todos: ['title'],
    },
  },
});

Also it should be supported to filter for relations:

app.service('users').find({
  query: {
    todos: {
      tag1: {
        $in: ['TEST'],
      },
    },
  },
});
@ps73 ps73 added the enhancement New feature or request label Jan 8, 2022
@ps73 ps73 self-assigned this Jan 10, 2022
ps73 added a commit that referenced this issue Jan 27, 2022
@ps73
Copy link
Owner Author

ps73 commented Feb 3, 2022

Selecting fields in $eager is possible since 0.4.0.

The filter example is not as easy to implement as I thought. Will close this issue because filtering is also possible with the new $rawWhere query param which is availabel since 0.5.0.

@ps73 ps73 closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant