James Potts
06/19/2020, 5:17 PMhackernews-node
tutorial, a couple issues came up and I was hoping to verify the behavior I saw with the Prisma team. First, the AuthPayload
in the schema.graphql file appears to be misconfigured since the user
field is defined as having a required String!
argument. However, when using the signup
mutation, an error is returned indicating that
Field \"user\" must not have a selection since type \"String!\" has no subfields.
This is because the query provided in the tutorial has the two fields from the AuthPayload
as return values. So, I updated the schema for the user field to include User!
. Now, when I execute the signup
mutation, it performs as expected. However, when an attempt is made to use the login
mutation, this message is returned:
Variable '$where' expected value of type 'UserWhereUniqueInput!' but got: {\"email\":\"<mailto:alice@prisma.io|alice@prisma.io>\"}. Reason: 'email' Field 'email' is not defined in the input type 'UserWhereUniqueInput'. (line 1, column 8):\nquery ($where: UserWhereUniqueInput!) {\n ^
janpio
James Potts
06/19/2020, 5:22 PMjanpio
Ryan
06/22/2020, 9:41 AMUserWhereUniqueInput
Could you check if email is set to @unique
in the Prisma datamodel.
Also as you're getting started with Prisma, I would strongly suggest Prisma 2 here as it is stable and in active development.