Skip to content

Create a subscription via model fields #34

@vCra

Description

@vCra

Hi there,
Currently, the subscriptions only allow subscriptions for any resource, or a specific resource by it's PK. Is it possible to implement functionally to subscribe to a set of resources that fulfil some criteria, other than PK.
For example, we might have a field called name, and we may want to subscribe to any creations in which the name == "John". The current work around is to subscribe for all creations, and then filter the stream client side.
Just an example of how this could be done
{
"stream": "people",
"payload": {
"action":"subscribe",
"data": {
"action": "create"
}
"filter":{
"name": "John"
}
}

It would probably also make sense to move the existing PK field to the new filter dict.

This is obviously a big design change, but I personally feel that keeping as much of the processing on the server side is better than the current workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions