Prisma Client User Type conflict with TypeScript User Type (type-graphql)



Hi, I create simple app with GraphQL Yoga, Prisma and TypeGraphQL.
Context TS interface with Prisma type:
export interface Context {
user?: AuthUser;
prisma: Prisma;
Box TS type:
export class Box {
@Field(type => ID)
id: string

@Field({ nullable: true })
name?: string

@Field(type => Int, { nullable: true })
items?: number
@Field(type => User)
 owner: User

Prisma datamodel Box:
type Box {
id: ID! @id
name: String @default(value: “”)
items: Int @default(value: 0)
owner: User
In Box resolver:
@Mutation(returns => Box)
async deleteBox(@Args() args: DeleteBoxArgs, @Ctx() context: Context): Promise {
return context.prisma.deleteBox({ id: });


Type ‘Box’ is not assignable to type ‘Box’. Two different types with this name exist, but they are unrelated.
Property ‘owner’ is missing in type ‘Box’.

How to avoid this kind of type conflicts? Please for help.


I believed this has been already resolved in slack.


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.