UncheckedCreateInput error when trying to create a many to many relationship (likeSermon / likePost)
Hello i get the following error when i try to creating a relationship where users can like sermons. Pleas i need help in rectifying this.
Type '{ sermonId: string; userId: string | undefined; }' is not assignable to type '(Without<LikedSermonCreateInput, LikedSermonUncheckedCreateInput> & LikedSermonUncheckedCreateInput) | (Without<...> & LikedSermonCreateInput)'.
Types of property 'userId' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.ts(2322)
index.d.ts(10062, 5): The expected type comes from property 'data' which is declared here on type '{ select?: LikedSermonSelect<DefaultArgs> | null | undefined; include?: LikedSermonInclude<DefaultArgs> | null | undefined; data: (Without<...> & LikedSermonUncheckedCreateInput) | (Without<...> & LikedSermonCreateInput); }'


0 Replies