createAccount.js
367 Bytes
import { prisma } from "../../../middlewares";
export default {
Mutation: {
createAccount: async (_, args) => {
const { name, email, bio = "", avatarUrl = "" } = args;
const user = await prisma.user.create({
data: {
name,
email,
bio,
avatarUrl,
},
});
return user;
},
},
};