feat: enhance QuizSchema and related schemas with new fields and relations
- Updated QuizSchema to expose correctAnswer as a field with a resolver, improving data retrieval for quizzes. - Introduced new object types for correctAnswer, allowing for flexible data structures (StringType and StringListType). - Modified createQuiz mutation to automatically associate the current user as centerMentorId, enhancing data integrity. - Added personalMilestone relation to ScheduleSchema, linking schedules to personal milestones for better tracking. - Included quiz relation in ServiceSchema, establishing a connection between services and their associated quizzes. - Updated Prisma types to reflect the new relationships and fields, ensuring consistency across the application.
This commit is contained in:
@@ -129,6 +129,9 @@ export class ServiceSchema extends PothosSchema {
|
||||
return serviceFeedbacks.length > 0
|
||||
},
|
||||
}),
|
||||
quiz: t.relation('quiz', {
|
||||
description: 'The quiz of the service.',
|
||||
}),
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user