We need to validate the filter path before executing it (or properly catch and serialize the exception if the entity query system throws one) when attempting to filter by a computed field.

Background:

While considering #2916074: [PP-1] Test coverage: FieldResolver: path validation for computed fields, I realized that the field resolution performed in Context\FieldResolver doesn't consider that filtering does not work for computed fields and will happily resolve the path. However, it is also does not seem like the right place to perform that validation. Either the Query system should perform the validation or EntityResource::getCollection should try/catch the query execution.

Comments

gabesullice created an issue. See original summary.

gabesullice’s picture

Issue summary: View changes
wim leers’s picture

Issue tags: +Needs tests

I'd be happy to provide reviews for this! It's important that we fix this.

e0ipso’s picture

> It's important that we fix this.

Agreed! It's a good DX improvement.

wim leers’s picture