import { schema } from 'nexus' export const PollQuestionAnswer = schema.objectType({ name: 'PollQuestionAnswer', definition(t) { t.model.id() t.model.createdAt() t.model.updatedAt() t.model.hasWon() t.model.text() t.model.numberOfVote() t.model.associatedPollQuestion() t.model.answeredByMeetingParticipants() t.model.answeredBy() }, }) export const PollQuestionAnswerQueries = schema.extendType({ type: 'Query', definition(t) { t.crud.pollQuestionAnswer() t.crud.pollQuestionAnswers({ filtering: true, ordering: true }) }, }) export const PollQuestionAnswerMutation = schema.extendType({ type: 'Mutation', definition: (t) => { t.crud.deleteOnePollQuestionAnswer({ alias: 'deletePollQuestionAnswer' }) t.crud.updateOnePollQuestionAnswer({ alias: 'updatePollQuestionAnswer' }) t.crud.createOnePollQuestionAnswer({ alias: 'createPollQuestionAnswer' }) }, })