import { schema } from 'nexus' export const NotificationPreference = schema.objectType({ name: 'NotificationPreference', definition(t) { t.model.id() t.model.createdAt() t.model.updatedAt() t.model.type() t.model.platform() t.model.createdAt() t.model.updatedAt() t.model.isEnable() t.model.users() }, }) export const NotificationPreferenceQueries = schema.extendType({ type: 'Query', definition(t) { t.crud.notificationPreference() t.crud.notificationPreferences({ filtering: true, ordering: true }) }, }) export const NotificationPreferenceMutation = schema.extendType({ type: 'Mutation', definition: (t) => { t.crud.deleteOneNotificationPreference({ alias: 'deleteNotificationPreference' }) t.crud.updateOneNotificationPreference({ alias: 'updateNotificationPreference' }) t.crud.createOneNotificationPreference({ alias: 'createNotificationPreference' }) }, })