react-apollo
react-apollo copied to clipboard
Add user to link
This was taken out for some reason
Hi @zwhitchcox a good catch. But you forgot the line with the userId.
So please edit your pull request and add that line:
const userId = getUserId(context)
So that postMutation will get:
function post(parent, args, context) {
const userId = getUserId(context)
return context.prisma.createLink({
url: args.url,
description: args.description,
postedBy: { connect: { id: userId } },
})
}
Btw https://github.com/howtographql/react-apollo/pull/76/files already does the same thing.
This is obsolete. Please merge the 76 pull request instead.