Added GraphQL queries for alerts and notifications.

This commit is contained in:
2025-04-01 02:14:36 +02:00
parent 2121c51ae6
commit fe1a9ed26b
4 changed files with 135 additions and 33 deletions

View File

@@ -50,6 +50,10 @@ import {
alertsSchema,
fetchAlertsGraphql,
createAlertGraphql,
removeAlertGraphql,
fetchNotificationsGraphql,
updateNotificationGraphql,
updateNotificationsGraphql,
} from './alerts.js';
import { verifyKey } from '../auth.js';
@@ -133,6 +137,7 @@ export async function graphqlApi(req, res) {
stashes: async (query) => fetchUserStashesGraphql(query, req),
stash: async (query) => fetchStashGraphql(query, req),
alerts: async (query) => fetchAlertsGraphql(query, req),
notifications: async (query) => fetchNotificationsGraphql(query, req),
// stash mutation
createStash: async (query) => createStashGraphql(query, req),
updateStash: async (query) => updateStashGraphql(query, req),
@@ -145,6 +150,9 @@ export async function graphqlApi(req, res) {
unstashMovie: async (query) => unstashMovieGraphql(query, req),
// alert mutation
createAlert: async (query) => createAlertGraphql(query, req),
removeAlert: async (query) => removeAlertGraphql(query, req),
updateNotification: async (query) => updateNotificationGraphql(query, req),
updateNotifications: async (query) => updateNotificationsGraphql(query, req),
},
});