Hello. How i can achieve this right after I subscribe to trigger a callback function that will f.ex do a api-request to some endpoint?
So I have this like this:
Subscription: { myQuery: { subscribe: ()=>pubsub.asyncIterator(channelId);, resolve: (payload: myType) => { return payload }, }, },
I would like right after I register/subscribe to channel to trigger it so somehow after
pubsub.asyncIterator(channelId)
this line runs. I tried some hacky solution with setTimeout but that is not good one.