Skip to content

Notify subscribers when entities are modified via QueryService #409

@lptr

Description

@lptr

The generated subscriptions currently notify clients about events that happen through the generated resolvers only. It would be nice if it was possible to also notify clients when entities are created/updated/deleted through the QueryService.

Example: my application receives log messages through MQTT and wants to notify GraphQL clients about these new messages. I am using the generated resolver for my MqttLogEntry objects, and the incoming messages are also stored via QueryService<MqttLogEntry>.createOne(). However, I cannot currently subscribe to these log entries via the generated subscription.

I currently rolled my own GraphQL subscription for this, but it would be nice to use the same features NestJS-Query already offers for other generated subscriptions, like filtering etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions