Skip to content

Conversation

@zwhitchcox
Copy link

This was taken out for some reason

This was taken out for some reason
@kwoxer
Copy link

kwoxer commented Apr 11, 2020

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 } },
  })
}

@kwoxer
Copy link

kwoxer commented Apr 11, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants