mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
exposed notification setting via graph
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { get } = require('lodash');
|
||||
const { DISABLE_REQUIRE_EMAIL_VERIFICATIONS } = require('./config');
|
||||
|
||||
module.exports = {
|
||||
User: {
|
||||
@@ -16,4 +17,8 @@ module.exports = {
|
||||
await User.updateNotificationSettings(input);
|
||||
},
|
||||
},
|
||||
Settings: {
|
||||
notificationsRequireConfirmation: () =>
|
||||
Boolean(!DISABLE_REQUIRE_EMAIL_VERIFICATIONS),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5,6 +5,13 @@ type User {
|
||||
notificationSettings: NotificationSettings
|
||||
}
|
||||
|
||||
type Settings {
|
||||
# notificationsRequireConfirmation when true indicates that User's must have
|
||||
# their email address confirmed/verified before they can recieve
|
||||
# notifications.
|
||||
notificationsRequireConfirmation: Boolean
|
||||
}
|
||||
|
||||
type UpdateNotificationSettingsResponse implements Response {
|
||||
# An array of errors relating to the mutation that occurred.
|
||||
errors: [UserError!]
|
||||
|
||||
Reference in New Issue
Block a user