Skip to content

Simplify filtering - #187

Open
edan-bainglass wants to merge 1 commit into
disable-graph-qlfrom
partially-simplify-query-params
Open

edan-bainglass wants to merge 1 commit into
disable-graph-qlfrom
partially-simplify-query-params

Conversation

@edan-bainglass

Copy link
Copy Markdown
Member

This PR removes the need for tricky custom logic to handle URL-reserved chars by replacing numeric operations with named ones, as well as replacing the negation operator with a URL-"safe" one.

For example

...?filter[value][>=]=10&filter[value][!==]=13

is now

...?filter[value][ge]=10&filter[value][~eq]=13

This addresses some comments made on #157 and #185.

_GENERAL_OPS = {
'==',
'!==',
'eq',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only one I'm not sure about. It is here to support [field][~eq]=, as [field][eq]= is just [field]=. Alternatively, we can instead support [field][ne] only, but it is unclear which direction is best. I keep it as is for now.

)


class Include(pdt.BaseModel):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reordering the classes.

@edan-bainglass
edan-bainglass force-pushed the partially-simplify-query-params branch from 5fbc83e to 3b279e7 Compare November 21, 2026 12:52
@edan-bainglass
edan-bainglass changed the base branch from main to disable-graph-ql November 21, 2026 12:53
@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.06%. Comparing base (55bab83) to head (ab4fa15).

❌ Your project status has failed because the head coverage (68.06%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           disable-graph-ql     #187      +/-   ##
====================================================
+ Coverage             67.90%   68.06%   +0.15%     
====================================================
  Files                    55       55              
  Lines                  2153     2151       -2     
====================================================
+ Hits                   1462     1464       +2     
+ Misses                  691      687       -4     
Flag Coverage Δ
pytests 68.06% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replace comparison operators with named ones to avoid custom URL
parsing. Same reasoning for replacing ! with ~ for negation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants