Skip to content

events

Concerns the service events Feathers emits.

NameCategoryDescription
muteEvent
hooks

Suppresses the service event for the current call by setting context.event to null. Feathers emits the standard created/updated/patched/removed event (the value of context.event) after the method runs; setting it to null prevents that emission so real-time subscribers and channels are not notified.

Useful for seeding, migrations and internal syncs that should not trigger downstream listeners. Works as a before, after or around hook.

waitForServiceEvent
utils

Wait for a service event to fire and resolve with the emitted record. Useful in tests to await the result of an asynchronous service event, a bit like promisify for Feathers events.

Curried: bind the app (and optional defaults) once, then call the returned function per service/event. Resolves with a [data, { event, context }] tuple: data is typed as the service's record type, and event is the union of the requested events.

Feathers emits events as emit(event, record, context) and fires one event per record, so each resolution carries a single record and its HookContext.

See all tags for the full vocabulary.

Released under the MIT License.