Skip to content

Commit cc86809

Browse files
committed
Update mutation docs, removing nested update deprecated path
1 parent 87a8076 commit cc86809

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

modules/ROOT/pages/mutations/update.adoc

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,10 @@ type Mutation {
3737
updatePosts(
3838
where: PostWhere
3939
update: PostUpdateInput
40-
connect: PostConnectInput
41-
disconnect: PostDisconnectInput
42-
create: PostCreateInput
43-
delete: PostDeleteInput
4440
): UpdatePostsMutationResponse!
4541
updateUsers(
4642
where: UserWhere
4743
update: UserUpdateInput
48-
connect: UserConnectInput
49-
disconnect: UserDisconnectInput
50-
create: UserCreateInput
51-
delete: UserDeleteInput
5244
): UpdateUsersMutationResponse!
5345
}
5446
----
@@ -91,10 +83,12 @@ Instead of creating a `Post` with the `create` mutation and then connecting it t
9183
mutation {
9284
updateUsers(
9385
where: { name: "John Doe" }
94-
create: {
95-
posts: [
96-
{ node: { content: "An interesting way of adding a new Post!" } }
97-
]
86+
update: {
87+
posts: {
88+
create: [
89+
{ node: { content: "An interesting way of adding a new Post!" } }
90+
]
91+
}
9892
}
9993
) {
10094
users {
@@ -137,10 +131,12 @@ For `update` operations, `connectOrCreate` can also be used as a top-level input
137131
----
138132
mutation {
139133
updateActors(
140-
connectOrCreate: {
134+
update: {
141135
movies: {
142-
where: { node: { id: "1234" } }
143-
onCreate: { node: { title: "Forrest Gump" } }
136+
connectOrCreate: {
137+
where: { node: { id: "1234" } }
138+
onCreate: { node: { title: "Forrest Gump" } }
139+
}
144140
}
145141
},
146142
where: { name: "Tom Hanks" }

0 commit comments

Comments
 (0)