import { schema } from 'nexus' export const NoteComment = schema.objectType({ name: 'NoteComment', definition(t) { t.model.id() t.model.createdAt() t.model.updatedAt() t.model.text() t.model.createdBy() t.model.notes() }, }) export const NoteCommentQueries = schema.extendType({ type: 'Query', definition(t) { t.crud.noteComment() t.crud.noteComments({ filtering: true, ordering: true }) }, }) export const NoteCommentMutation = schema.extendType({ type: 'Mutation', definition: (t) => { t.crud.deleteOneNoteComment({ alias: 'deleteNoteComment' }) t.crud.updateOneNoteComment({ alias: 'updateNoteComment' }) t.crud.createOneNoteComment({ alias: 'createNoteComment' }) }, })