feat!: new query helpers and muteEvent hook#38
Merged
fratzinger merged 1 commit intoJun 24, 2026
Merged
Conversation
- muteEvent(options?): hook that suppresses the service event by setting context.event to null, optionally gated by a when boolean/predicate (before/after/around). - queryHasProperty(query, name | names): util to detect a property anywhere in a query, including nested in $and/$or/$nor. - walkQuery: walker options gain stop() to end traversal early. - queryDefaults(query, defaults): util that adds default query fields only for fields the query does not already constrain (nested-aware) — the query counterpart of the defaults data transformer. - setQueryDefaults(defaults): before/around hook applying queryDefaults to context.params.query (e.g. filter out template rows by default). - softDelete: new allowQueryOverride option; its query filter now goes through queryDefaults. BREAKING CHANGE: by default softDelete no longer always appends deletedQuery. When the incoming query already references a deletedQuery field (e.g. deletedAt, including nested in $and/$or/$nor), that filter is now skipped so callers can read soft-deleted rows; remove still soft-deletes. Set allowQueryOverride: false to restore the previous always-enforce behavior.
Deploying feathers-utils with
|
| Latest commit: |
bfe981e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://54ae98ba.feathers-utils.pages.dev |
| Branch Preview URL: | https://feat-mutevent-setquerydefaul.feathers-utils.pages.dev |
fratzinger
deleted the
feat/mutEvent-setQueryDefaults-queryDefaults-queryHasProperty
branch
June 24, 2026 08:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: by default softDelete no longer always appends deletedQuery. When the incoming query already references a deletedQuery field (e.g. deletedAt, including nested in $and/$or/$nor), that filter is now skipped so callers can read soft-deleted rows; remove still soft-deletes. Set allowQueryOverride: false to restore the previous always-enforce behavior.