본문 바로가기
TIL/GraphQL

'likeCount' Expected non-null value, found null.

by 홍차23 2020. 3. 15.

Error: Variable '$data' expected value of type 'PostCreateInput!' but got: {"caption":"슈퍼히어로의 등장","title":"고양이가 세상을 구한다","user":{"connect":{"id":"ck7bq44ja000q0798887nbw2c"}}}. Reason: 'likeCount' Expected non-null value, found null. (line 1, column 11):

 

해결>

datamodel.prisma

type Post {

    likeCount 삭제

}

댓글