import { schema } from 'nexus' export const ChosenModel = schema.objectType({ name: 'ChosenModel', definition(t) { t.model.id() t.model.createdAt() t.model.updatedAt() t.model.note() t.model.model() t.model.room() t.model.properties() }, }) export const ChosenModelQueries = schema.extendType({ type: 'Query', definition(t) { t.crud.chosenModel() t.crud.chosenModels({ filtering: true, ordering: true }) }, }) export const ChosenModelMutation = schema.extendType({ type: 'Mutation', definition: (t) => { t.crud.deleteOneChosenModel({ alias: 'deleteChosenModel' }) t.crud.updateOneChosenModel({ alias: 'updateChosenModel' }) t.crud.createOneChosenModel({ alias: 'createChosenModel' }) }, })