feat: enhance message retrieval logic with context-based filtering
- Updated the MessageSchema to include context-aware filtering for notifications, allowing retrieval of messages based on recipientId when the context is NOTIFICATION. - Improved the resolve function to handle subscription checks, ensuring that unauthorized access is properly managed. - Added error handling for cases where the context is not allowed, enhancing overall robustness of the message retrieval process.
This commit is contained in:
@@ -207,12 +207,7 @@ export class QuizSchema extends PothosSchema {
|
||||
type: this.quiz(),
|
||||
args: {
|
||||
data: t.arg({
|
||||
type: this.builder.generator.getCreateInput('Quiz', [
|
||||
'id',
|
||||
'centerMentorId',
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
]),
|
||||
type: this.builder.generator.getCreateInput('Quiz', ['id', 'centerMentorId', 'createdAt', 'updatedAt']),
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user