Skip to content

chore: scrub stale filter argument references in comments/errors#996

Merged
pyramation merged 1 commit intomainfrom
feat/scrub-stale-filter-arg-comments
Apr 18, 2026
Merged

chore: scrub stale filter argument references in comments/errors#996
pyramation merged 1 commit intomainfrom
feat/scrub-stale-filter-arg-comments

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Follow-up cleanup to #995. The GraphQL connection argument was renamed from filter to where in commit 10b4fc6 (via connectionFilterArgumentName: 'where' defaulted in graphile-connection-filter's preset), but a number of JSDoc examples, plugin descriptions, error strings, and preset comments were not updated at the time. This PR scrubs them.

Changes are almost entirely in comments/docstrings. The only behavior-adjacent diffs are:

  1. Two error message strings renamed:
    • "Empty objects are forbidden in filter argument input.""...in where argument input."
    • "Null literals are forbidden in filter argument input.""...in where argument input."
  2. One test case title renamed to match what it actually asserts (where arg, not filter).
  3. One internal extend(...) log string renamed (not user-visible, just debug output).

Specifically updated:

  • graphile-connection-filter: JSDoc examples (filter:where:) in ConnectionFilter{Forward,Backward,ComputedAttributes}RelationsPlugin, the ConnectionFilterArgPlugin top-level JSDoc + description string + inline comments, and the two error message strings in utils.ts, ConnectionFilterAttributesPlugin.ts, and operatorApply.ts.
  • graphile-postgis: JSDoc example in spatial-relations.ts.
  • graphile-settings: corrected the misleading preset comments in constructive-preset.ts (the ones that tripped me up in docs(graphile-postgis): deep spatial-relations docs; lead with client-side GeoJSON problem #995 and made me think the GraphQL arg was still filter:), updated an example comment in enable-all-filter-columns.ts, and renamed the preset-integration test case title.

Review & Testing Checklist for Human

  • Confirm you're OK with the two error message text changes — anyone downstream matching on the exact string '... forbidden in filter argument input.' (equality check, not substring) would need to update their match. I grepped the repo for these strings and the only call sites are the three source files in this diff; no test snapshots reference them.
  • Skim the preset comments in graphile/graphile-settings/src/presets/constructive-preset.ts — the rewritten block about "filtering now lives under the where argument" should read accurately to you.

Notes

  • No runtime behavior change other than the two error message strings mentioned above.
  • Ran the individual graphile-connection-filter and graphile-postgis package builds locally; both clean. The workspace-level build fails on unrelated missing cross-package type declarations in my environment, but CI will do the full build.
  • CHANGELOG entries that reference the historical filterwhere rename commit were deliberately left alone — they're historical and accurate.

Link to Devin session: https://app.devin.ai/sessions/059b0c2e4594474aa107e3f83f83fe0f
Requested by: @pyramation

The GraphQL connection argument was renamed from `filter` to `where`
back in commit 10b4fc6 (via `connectionFilterArgumentName: 'where'` in
`graphile-connection-filter`'s default preset). A number of JSDoc
examples, plugin descriptions, and error strings were not updated at
the time and still referenced the old `filter:` name, which was
confusing when reading the code.

This change:
- Updates JSDoc `filter: { ... }` examples to `where: { ... }` in the
  forward/backward/computed-attribute relation plugins, the spatial
  relations plugin, and the constructive preset.
- Rewords the `ConnectionFilterArgPlugin` JSDoc, description, and
  internal log string to reflect that the argument name is `where`.
- Renames the "Empty objects are forbidden in filter argument input"
  and "Null literals are forbidden in filter argument input" error
  messages to say "where argument input".
- Fixes the stale preset comments that still claimed filtering lives
  under the `filter` argument.
- Renames one test case title to match what it actually asserts (`where`
  not `filter`).

No behavior change beyond the text of the above two error messages.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit df0918a into main Apr 18, 2026
51 checks passed
@pyramation pyramation deleted the feat/scrub-stale-filter-arg-comments branch April 18, 2026 01:55
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