user
12/19/2017, 9:00 PMhttps://prisma.slack.com/files/U63BKR7S9/F8H0PC7FD/__________________________2017-12-19____23.52.48.png▾
js
async writePost(parent, { title, text }, ctx, info) {
const authorId = getUserId(ctx)
return ctx.db.mutation.createPost(
{
data: {
title,
text,
isPublished: true,
author: {
connect: { id: authorId },
},
},
},
info,
)
}
You should try the basic project from the @beta release.