-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dgs): added auth to queries and mutations (#1982)
Squashed commit of the following: commit 6f6420323765ad24f3c2c73d60c936d8dd32eadc Author: Rani <[email protected]> Date: Tue Aug 10 09:18:50 2021 -0700 fix(pr): skip schema validation commit e5e37c723ae9f9d33de48615a8953b26ab507c31 Author: Rani <[email protected]> Date: Mon Aug 9 15:56:51 2021 -0700 fix(dgs): application query auth commit 35aec6590744b97a05e464601d56e99277a5c23e Author: Rani <[email protected]> Date: Mon Aug 9 13:55:20 2021 -0700 feat(dgs): added auth to dismissNotification by adding the app name to the query commit cd17650f2c85befb9bce8b5357599687b7eefe84 Author: Rani <[email protected]> Date: Mon Aug 9 13:51:18 2021 -0700 feat(dgs): added auth to queries and mutations (cherry picked from commit 75b2a6fc1ed76c6c759a815a34e96f764b9c33a8) Co-authored-by: Rani Horev <[email protected]>
- Loading branch information
Lorin Hochstein
and
Rani Horev
authored
Aug 10, 2021
1 parent
7065b78
commit 43bed86
Showing
7 changed files
with
52 additions
and
7 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ class SqlDismissibleNotificationRepositoryTests { | |
@Test | ||
fun `correctly dismisses notification`() { | ||
val uid = notificationRepository.storeNotification(notification) | ||
expectThat(notificationRepository.dismissNotificationById(uid, "[email protected]")) | ||
expectThat(notificationRepository.dismissNotificationById(deliveryConfig.application, uid, "[email protected]")) | ||
.isTrue() | ||
|
||
val updatedNotification = notificationRepository.notificationHistory(deliveryConfig.application, limit = 1).first() | ||
|
@@ -158,7 +158,7 @@ class SqlDismissibleNotificationRepositoryTests { | |
notification.copy(triggeredAt = clock.tickMinutes(1)) | ||
) | ||
if (it < 5) { | ||
notificationRepository.dismissNotificationById(uid, "[email protected]") | ||
notificationRepository.dismissNotificationById(deliveryConfig.application, uid, "[email protected]") | ||
} | ||
} | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -333,5 +333,6 @@ enum MdEventLevel { | |
} | ||
|
||
input MdDismissNotificationPayload { | ||
application: String! | ||
id: String! | ||
} |