Skip to content

Bug: Filter passes query validation, but the filter is not applied #659

Closed
@bart-degreed

Description

@bart-degreed

Description

Consider the request:

/documents/1?include=collaborators&filter[collaborators.first-name]=like:john

This request passes query validation, but the filter is not applied. It returns all collaborators. This is likely caused by EF Core not supporting filtered includes. In contrast, the next request:

/documents/1/collaborators?filter[first-name]=like:john

returns the next error message:

Query parameter filter is currently not supported on nested resource endpoints (i.e. of the form '/article/1/author?filter=...'

which is helpful. I think the fix would be to return the same error message in this case, instead of silently ignoring the filter.

Environment

v4.0.0-alpha4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions