ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
56 stars 40 forks source link

Bug with href-schema prevents the use of all kinds of filters #101

Closed adonig closed 11 months ago

adonig commented 11 months ago

Describe the bug Trying to use the is_nil filter on a string field raises an InvalidQuery error:

Expected "string", got %{"is_nil" => "false"}, at ["filter", "string_field"].

To Reproduce Try something like /api/resources?filter[string_field][is_nil]=false

Expected behavior It should respond with resources where the string field is not nil.

Runtime

Additional context The problem seems to be that the href_schema expects the field's filter to be of type string.

adonig commented 11 months ago

Fixed by #102