ezeikel
01/02/2022, 2:52 PMezeikel
01/02/2022, 2:52 PMUnknown arg `participant` in data.ledger.create.periods.create.0.payments.create.0.participant for type PaymentUncheckedCreateWithoutPeriodInput. Did you mean `participantId`?ezeikel
01/02/2022, 2:59 PMparticipant does exist on Payment modelezeikel
01/02/2022, 3:01 PMpayments.create in my Mutation resolver but essentially looks like this:
periodsCreate.push({
type: periodType,
number: i,
payments: {
create:
participants?.map(participant => ({
type: PaymentType.CONTRIBUTION,
dueDate: dates[i],
participant: {
connectOrCreate: {
where: {
name: participant.name,
},
create: participant,
},
},
})) || undefined,
},
});ezeikel
01/02/2022, 3:01 PMezeikel
01/02/2022, 11:01 PMexport type PaymentCreateOrConnectWithoutPeriodInput = {
where: PaymentWhereUniqueInput
create: XOR<PaymentCreateWithoutPeriodInput, PaymentUncheckedCreateWithoutPeriodInput>
}ezeikel
01/02/2022, 11:02 PMPaymentUncheckedCreateWithoutPeriodInput instead of the PaymentCreateWithoutPeriodInputezeikel
01/03/2022, 2:09 AM