I have a schema that looks like this ```type Event...
# prisma-whats-new
w
I have a schema that looks like this
Copy code
type EventPayment {
 id: ID!
 log: [EventPaymentLog!]! @relation(name: "EventPaymentLogOnEventPayment")
 status: EVENT_PAYMENT_STATUS!
}
I want to update the EventPayment with a new status and log entry. What is the syntax for adding a new log entry? Can I do that using a nested mutation, or is that not possible since there's a one-to-many relationship between EventPayment and EventPaymentLog?
n
@wallslide it's possible using
createEventPaymentLog(eventPaymentId: "<id>")
but appending instead of replacing would be a nice feature: https://github.com/graphcool/feature-requests/issues/127
w
I was hoping I could pass an actual EventPaymentLog in and have it automatically added to the array
but I ended up just making a separate call to
createEventPaymentLog
.