Hey all, so I’m trying to get prisma 1 working wit...
# orm-help
p
Hey all, so I’m trying to get prisma 1 working with subscriptions. I followed the example and it looks like this.
Copy code
const userUpdates = {
  subscribe: async (parent, { id }, context, info) => {
    // Function: userUpdates, a resolver function that subscribes to
    // any changes made to a user.
    //
    // Parameter(s):
    //
    //   parent, args, context, info - default prisma parameters
    //   args is an object containing the user Id
    //
    // Return Value(s):
    //
    //   a subscription
     // node: { id_contains: id },

    return context.prisma.$subscribe.user({ node: { id: id }, mutation_in: ["UPDATED"] }).node();
  },
  resolve: (payload) => {
    //returning payload
    console.log("hi", "two")
    return payload;
  }
}