You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using your tutorial and code sample to implement subscriptions over WS using a very similar tech stack. I would like to be able to supply an ID for the specific Post (or in my own case, Story) for which I'd like to receive updates, instead of receiving updates for every post. I added the ID as a parameter to the subscription query, but I am quite lost as to how I should actually filter which events are emitted based on that ID. Should the ID be part of the Event trait? It seems like the general subscribe method of the PubSubServiceImpl you provided can only work with the event name, as that is the only field in the Event trait currently.
Perhaps I should implement a specific PubSubService for my StoryEvent, which also holds a Story, so it will be able to filter based on that story's ID?
Any help would be much appreciated!
P.S.: I realize the code in this repository is already quite old by now, but I did manage to reuse much of it without much hassle, for which I am very thankful! Perhaps I could update this repository with a more up-to-date version of this example, extended with ID-based filtering, once I got it working for myself.
The text was updated successfully, but these errors were encountered:
Hi there,
I'm using your tutorial and code sample to implement subscriptions over WS using a very similar tech stack. I would like to be able to supply an ID for the specific Post (or in my own case, Story) for which I'd like to receive updates, instead of receiving updates for every post. I added the ID as a parameter to the subscription query, but I am quite lost as to how I should actually filter which events are emitted based on that ID. Should the ID be part of the Event trait? It seems like the general
subscribe
method of thePubSubServiceImpl
you provided can only work with the event name, as that is the only field in theEvent
trait currently.Perhaps I should implement a specific
PubSubService
for myStoryEvent
, which also holds aStory
, so it will be able to filter based on that story's ID?Any help would be much appreciated!
P.S.: I realize the code in this repository is already quite old by now, but I did manage to reuse much of it without much hassle, for which I am very thankful! Perhaps I could update this repository with a more up-to-date version of this example, extended with ID-based filtering, once I got it working for myself.
The text was updated successfully, but these errors were encountered: