Ash.Filter.parse

You're seeing just the function parse, go back to Ash.Filter module for more information.
Link to this function

parse(resource, statement, aggregates \\ %{})

View Source

Parses a filter statement

See the module documentation for more information on the supported formats for filter statements.

Important

If you are trying to validate a filter supplied from an external/untrusted source, be sure to use parse_input/2 instead! The only difference is that it only accepts filters over public attributes/relationships.

Aggregates

Since custom aggregates can be added to a query, and aggregates must be explicitly loaded into a query, the filter parser does not parse them by default. If you wish to support parsing filters over aggregates, provide them as the third argument. The best way to do this is to build a query with the aggregates added/loaded, and then use the aggregates key on the query, e.g

NOTE

A change was made recently that will automatically load any aggregates that are used in a filter. This function still requires aggregates to be passed in.

Ash.Filter.parse(MyResource, [id: 1], query.aggregates)