anyone have idea how to implement forgotPassword w...
# orm-help
e
anyone have idea how to implement forgotPassword with send grid
Copy code
t.field("forgotPassword", {
      type: "TriggerPasswordResetPayload",
      args: {
        email: stringArg()
      },
      resolve: (parent, { email }, context) => {
        const user = context.prisma.user({ email });
        if (!user) throw new Error("No user with this email.");
        const emailContent = {...}
        sgMail.send(emailContent);
        return null;
  }
});