ericsonluciano
06/05/2019, 6:55 AMt.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;
}
});