new activityLog entity
This commit is contained in:
43
dataconnect/connector/activityLog/mutations.gql
Normal file
43
dataconnect/connector/activityLog/mutations.gql
Normal file
@@ -0,0 +1,43 @@
|
||||
mutation CreateActivityLog(
|
||||
$title: String!,
|
||||
$description: String!,
|
||||
$activityType: ActivityType!,
|
||||
$userId: UUID!,
|
||||
$isRead: Boolean
|
||||
) @auth(level: USER) {
|
||||
activityLog_insert(
|
||||
data: {
|
||||
title: $title
|
||||
description: $description
|
||||
activityType: $activityType
|
||||
userId: $userId
|
||||
isRead: $isRead
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation UpdateActivityLog(
|
||||
$id: UUID!,
|
||||
$title: String,
|
||||
$description: String,
|
||||
$activityType: ActivityType,
|
||||
$userId: UUID,
|
||||
$isRead: Boolean
|
||||
) @auth(level: USER) {
|
||||
activityLog_update(
|
||||
id: $id,
|
||||
data: {
|
||||
title: $title
|
||||
description: $description
|
||||
activityType: $activityType
|
||||
userId: $userId
|
||||
isRead: $isRead
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation DeleteActivityLog(
|
||||
$id: UUID!
|
||||
) @auth(level: USER) {
|
||||
activityLog_delete(id: $id)
|
||||
}
|
||||
44
dataconnect/connector/activityLog/queries.gql
Normal file
44
dataconnect/connector/activityLog/queries.gql
Normal file
@@ -0,0 +1,44 @@
|
||||
query listActivityLog @auth(level: USER) {
|
||||
activityLogs {
|
||||
id
|
||||
title
|
||||
description
|
||||
activityType
|
||||
userId
|
||||
isRead
|
||||
}
|
||||
}
|
||||
|
||||
query getActivityLogById(
|
||||
$id: UUID!
|
||||
) @auth(level: USER) {
|
||||
activityLog(id: $id) {
|
||||
id
|
||||
title
|
||||
description
|
||||
activityType
|
||||
userId
|
||||
isRead
|
||||
}
|
||||
}
|
||||
|
||||
query filterActivityLog(
|
||||
$userId: UUID,
|
||||
$activityType: ActivityType,
|
||||
$isRead: Boolean
|
||||
) @auth(level: USER) {
|
||||
activityLogs(
|
||||
where: {
|
||||
userId: { eq: $userId }
|
||||
activityType: { eq: $activityType }
|
||||
isRead: { eq: $isRead }
|
||||
}
|
||||
) {
|
||||
id
|
||||
title
|
||||
description
|
||||
activityType
|
||||
userId
|
||||
isRead
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user