Is it possible to create and `push` a new node on ...
# prisma-whats-new
j
Is it possible to create and
push
a new node on a to-many relation? For example i want to add a relation from a -> b, butI still want the a->c connection. Now it overwrites the existing relations.
Copy code
mutation {
    updatePost(id: "1", lastReaction: "17:32", 
    reactions: [{text: "new reation"}]) {
        id
    }
}
This will overwrite what already exist in
reactions
j
I want to say
connect
might do that, but I'm sure
So something like
Copy code
mutation {
    updatePost(id: "1", lastReaction: "17:32", 
    reactions: {
        # If you want to use an existing reaction
        connect: [{id: "reactionid"}]
        # If you want to create a new reaction
       create: [{text: "text"}]
    }) {
        id
    }
}
Just suggesting this based on what I see here: https://www.prismagraphql.com/docs/reference/prisma-api/mutations-ol0yuoz6go#examples
j
Cool! And i can use Prisma out of the box with Graph QL?
j
Prisma is the new database query layer that Graphcool just released.
Are you currently using Graphcool Cloud?
j
Yeah, i'm using console.graph.cool
j
Ah
j
aha, thanks i'll have a look