Best way to handle background jobs / server side subscriptions


#1

Hey

It’s been a while since I used Prisma and Server Side Subscriptions is no longer documented, so I am looking for a way to observe changes to data (e.g. password changed, user registered, comment created) so I can fire actions (emails, 3rd image processing)…

Where is the best place to put this stuff inside the Prisma ecosystem now?

Cheers! :slight_smile:


#2

Server side subscriptions are still supported. They are not well documented though but you can use them.

Here is the reference for them:
image


#3

Thanks @pantharshit00 but Prisma seem to be doing away with them, hence how hidden they are in the docs.

Outside of Prisma, how are people handling this today? Just inside the resolver? :wink:


#4

If you want custom solution I personally use https://www.npmjs.com/package/bull to deliver webhooks.

just call the queue from the resolvers