-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EVG-355: Email notification automation (#150)
* add relations for notifications and notification channels * fill up notification channels and then create notifications * use DocumentNode types for GraphQL queries in server-side groups module * make notification related GraphQL queries use generated typings, split up gql files into folders * integrate sendinblue API, allow sending, withholding and expiring email notifications * stub sendinblue API key environment variable where necessary * update dependencies * inject SENDINBLUE_API_KEY environment variable from secrets
- Loading branch information
1 parent
1ffee06
commit f77f0a7
Showing
65 changed files
with
11,112 additions
and
3,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...isted_operations/1f9769588899e34aee2006ff85dbe165fdc1da7e36f7233f40200b61749f7efb.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation MarkNotificationAsSent($id: Int!, $sentAt: Datetime) { | ||
updateNotification(input: {patch: {sentAt: $sentAt}, id: $id}) { | ||
notification { | ||
id | ||
sentAt | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...isted_operations/20ed2a63302fafe0cb8c286367689e5df6b422655732cccf7f7ad794e6235f21.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
query UsersWithoutNativeGroup($lid: Int!, $nativeSize: Int!) { | ||
usersWithoutNativeGroup(lid: $lid, first: $nativeSize) { | ||
nodes { | ||
id | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...isted_operations/87385710d4ae10734f8916bce50e540dd35a1ddd85cc2c15723457fad830e6da.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
query NotificationChannelByName($name: String!) { | ||
notificationChannelByName(name: $name) { | ||
id | ||
__typename | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...isted_operations/c4ab767dd17854487e034a8d3908de1a0d703ccc5db00f6e25885b83fb3b71e3.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mutation CreateGroupUser($userType: UserType!, $userId: Int!, $groupId: Int!) { | ||
createGroupUser(input: {groupUser: {userType: $userType, userId: $userId, groupId: $groupId}}) { | ||
groupUser { | ||
id | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...isted_operations/d0bd9bea6c2e17a29bf91b315d5cb089fae4f13d2c19db0d563c2e9d7e890521.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
query UsersWithoutLearnerGroup($lid: Int!, $lsklid: Int!, $learnerSize: Int!) { | ||
usersWithoutLearnerGroup(lid: $lid, lsklid: $lsklid, first: $learnerSize) { | ||
nodes { | ||
id | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...isted_operations/e1b54e7608975ab4f1565bfbf8850d82d02de79c5ca634b9c61cacabbe1e14c4.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
query OutstandingEmailNotifications { | ||
notificationChannelByName(name: "Email") { | ||
notificationsByChannelId(orderBy: CREATED_AT_ASC, filter: {sentAt: {isNull: true}}) { | ||
nodes { | ||
id | ||
user { | ||
emailNotificationsEnabled | ||
username | ||
unconfirmedEmail | ||
__typename | ||
} | ||
params | ||
expiresAt | ||
withheldUntil | ||
__typename | ||
} | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...isted_operations/ec55bc9f282f269f335da935054a786d8bd69475be27ce0e432b2e304bcdaa8b.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
mutation CreateNotification($channelId: Int!, $userId: Int!, $sentAt: Datetime, $params: JSON, $expiresAt: Datetime, $withheldUntil: Datetime) { | ||
createNotification(input: {notification: {userId: $userId, channelId: $channelId, params: $params, sentAt: $sentAt, expiresAt: $expiresAt, withheldUntil: $withheldUntil}}) { | ||
clientMutationId | ||
notification { | ||
createdAt | ||
expiresAt | ||
withheldUntil | ||
id | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.