Entity in Typescript does not have all properties

I have this entity

entity Module {=psl
  id        Int @id @default(autoincrement())
  name      String
  user      User @relation(fields: [userId], references: [id])
  userId    Int
  notebooks Notebook[]
  tasks     Task[]
psl=}


and a query to get modules from a user
export const getModules: GetModules<void, Module[]> = (args: any, context: any) => {
    if (!context.user) {
        throw new HttpError(401);
    }

    return context.entities.Module.findMany({
        where: {user: {id: context.user.id}}
    });
};


but when I use this on the frontend, it returns an entity that does not match the prisma entity. It is missing the tasks, user, and notebooks properties.
image.png
Was this page helpful?