Does anyone know if nested `create` mutations insi...
# orm-help
p
Does anyone know if nested
create
mutations inside an
update
mutation are absolute or cumulative? For example: If I update a
Menu
to
create
more `Product`s, like so:
Copy code
mutation {
    updateMenu(where: {id: $id}, data: {
        products: {
            create: [
                {}, ...
            ]
        }
    }) {
        id
    }
}
... does this replace the products it already had or does it add them to the existing list?
c
it adds them to the list
set
would replace the items but it is currently not supported in prisma client yet https://github.com/prisma/prisma/issues/3921
👍 1