That works fine in the database as I can observe in the db studio.entity Questionnaire {=psl id String @id @default(uuid()) ... project Project? @relation(fields: [projectId], references: [id]) projectId Int? ... psl=}
That also works fine. In a console log, I perfectly see my project object as part of my questionnaire array. (see screenshot)export const getQuestionnaires: GetQuestionnaires<void, Questionnaire[]> = async (_args, context) => { if (!context.user) { throw new HttpError(401); } return context.entities.Questionnaire.findMany({ where: { userId: context.user.id }, **include: { project: true,** }, orderBy: { createdAt: 'desc', }, }); };


Join the Discord to ask follow-up questions and connect with the community
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.
4,603 Members
Join