A step-by-step tutorial on adding realtime GraphQL subscriptions to a Node.js API using Prisma 1 and Prisma bindings. Covers WebSocket-based subscription mechanics, Prisma's subscription API (CREATED, UPDATED, DELETED events), filtering with the `where` argument, the `PostSubscriptionPayload` type fields (mutation, node, updatedFields, previousValues), and implementing two subscription resolvers: one for post creation/updates and one for deletions. Note: this tutorial uses the now-deprecated Prisma 1.
Table of contents
Overview1. Project setup2. Understanding Prisma’s subscription API3. Add the publication subscription4. Add the postDeleted subscriptionSummary1 Impression