Skip to content

Easier access to Request's Filter values to enable conditional domain logic #9441

@PabloAlarcon

Description

@PabloAlarcon

Product

Hot Chocolate

Is your feature request related to a problem?

There are several advanced scenarios where we need to inspect the Request's filter values to either act on it or even move away from the default filtering for specific fields and implement a low-level, optimized filter instead.

First of all, is there specific Documentation or sample implementation to access the Filter paramaters that I may have missed?.

I've been able to access this information via a Middleware component deriving from ObjectFieldDescriptorAttribute and accessing and manually parsing the Filter AST tree from IMiddlewareContext .ArgumentLiteral<IValueNode>("where");, however this is very tedious and error prone, specially for Composite Filters with And, Ors etc.

The solution you'd like

A library-provided solution to access the Filter parameters in a:

  • Opt-In "only incur the performance cost of parsing it when asked to".
  • Type safe, .NET simple classes modelling of the filter parameters.

Additionally, a simple way to remove parameters for those scenarios where the application decides to take over the implemention of the filtering.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions