graphql subscription triggered by association
I have this subscription on the user resource
User
has one-to-one association with Preference
resource, I would like to publish to that subscription when I update the associated too, can I do that via DSL or creating a change on the targets actions in that resource?Solution:Jump to solution
At the moment I think the only way would be to have a change that updates the user resource as well to trigger the subscription or have 2 separate subscriptions on the client.
3 Replies
Another way that I tried was creating 2 subscriptions, one for each resource, but I got an error when trying to subscribe to both at the same time:
And I got the error
Only one field is permitted on the root object when subscribing
Solution
At the moment I think the only way would be to have a change that updates the user resource as well to trigger the subscription or have 2 separate subscriptions on the client.
You can create a feature request on GitHub, we might be able to add something to the dsl