Rather than having to write each object in a relev...
# orm-help
f
Rather than having to write each object in a relevant
{update: object }
, is there a way to automate this?
t
Are you talking about something like nexus-prisma? https://github.com/prisma/nexus-prisma
f
Nope, I'm talking about the case of developing a form in the front end. I receive an object and populate an input element for each field in the object. These input fields already have the existing values so it's nice, and when I edit these input elements I can map them directly to the fields in the object I received, which is also nice. The problem is when I submit the form, if some of those fields belong to a child of the type in the root of the query. I would then have to prepare something like this:
Copy code
{
    child: {
        update: {
             name: "newName"
        }
    }
}
When I say prepare I mean that I have to wrap the child type in an object with an appropriate field such as
update
or
connect
, etc.