Hello everyone! I'm trying to create a one to many...
# orm-help
k
Hello everyone! I'm trying to create a one to many relationship. How can I connect the nested document if receiving an array?
Copy code
...
const fields = {username, ...args};
fields.books = {connect: {username: username}}
return ctx.prisma.createBooks(books)
Books should returns a list correctly but the above (mutation) returns an error that property username does not exist