Skip to content

Filter instead of failing for nil string values#503

Open
amaierhofer wants to merge 1 commit intographiti-api:mainfrom
amaierhofer:fix-nil-handling-in-eql-filter
Open

Filter instead of failing for nil string values#503
amaierhofer wants to merge 1 commit intographiti-api:mainfrom
amaierhofer:fix-nil-handling-in-eql-filter

Conversation

@amaierhofer
Copy link
Contributor

@amaierhofer amaierhofer commented Feb 18, 2026

Passing a filter like /api/people?filter[first_name][eq]= currently fails with Unsupported argument type: NilClass. Construct an Arel node instead. when the scope is resolved.

This PR would allow to filter for nil with the above request. The additional presence calls are necessary to make the inversion of the filter work as well.

I am unsure about what to do about the error requiring ostruct on some of the ci runs. See also #410 for a similar attempt at implementing that

@amaierhofer amaierhofer force-pushed the fix-nil-handling-in-eql-filter branch 6 times, most recently from af24aa1 to d6f5589 Compare February 18, 2026 16:12
@amaierhofer amaierhofer changed the title Filter instead of failing for nil string values Filter eq instead of failing for nil string values Feb 18, 2026
@amaierhofer amaierhofer changed the title Filter eq instead of failing for nil string values Filter instead of failing for nil string values Feb 18, 2026
@amaierhofer amaierhofer force-pushed the fix-nil-handling-in-eql-filter branch from d6f5589 to af24aa1 Compare February 19, 2026 13:16
This currently fails with

`Unsupported argument type: NilClass. Construct an Arel node instead.`

when the scope is resolved.

Prior art from graphiti-api#410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant