ChilliCream / ChilliCream/graphql-platform

Manually create expression tree from filter input

Open
#4,385 3 comments 4 reactions 2 assignees View on GitHub

@PascalSenn is already working on this.

Since Nov 5, 2021.

🌶️ hot chocolate Area: Data
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Is your feature request related to a problem?

Currently filtering only seems to work when returning an IQueryable. However, I'm calling a service that does not return a IQueryable; it does however accept a collection of Expressions as a parameters (which are in turn applied to a IQueryable inside that service).

The solution you'd like

I'd be great if there would be a way to manually build the expression tree based on a filter input parameter so I can do something like:

public Task<IEnumerable<User>> GetUsersAsync([Service] IUserService service, UserFilterInput filter) 
{
    return service.GetAllAsync(filter.ToExpressions());
}
Product

Hot Chocolate

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.