본문 바로가기
TIL/GraphQL

GraphQL | Field 'email' is not defined in the input type 'UserWhereUniqueInput'.

by 홍차23 2020. 2. 1.

requestSecret -> true

 

error>

{ Error: Variable '$where' expected value of type 'UserWhereUniqueInput!' but got: {"email":"kay@gmail.com"}. Reason: 'email' Field 'email' is not defined in the input type 'UserWhereUniqueInput'. (line 1, column 36):
mutation ($data: UserUpdateInput!, $where: UserWhereUniqueInput!) 

 

solution>

datamodel.prisma > 

userName: String! @unique 

email: String! @unique

 

@unique 를 추가함.

 

 

댓글