Skip to content

Commit 2afa9df

Browse files
authored
Remove section about mixing PUSH and POP (#204)
This section is not needed as it describes what can be considered normal GraphQL usage.
1 parent 907833f commit 2afa9df

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

modules/ROOT/pages/mutations/update.adoc

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -398,56 +398,6 @@ a|
398398
|===
399399
====
400400

401-
=== Mixing `_PUSH` and `_POP`
402-
403-
It is possible to perform both a `_PUSH` and `_POP` operation in one single `update` mutation.
404-
405-
Consider the following type definitions:
406-
407-
[source, graphql, indent=0]
408-
----
409-
type Movie {
410-
title: String
411-
tags: [String]
412-
moreTags: [String]
413-
}
414-
----
415-
416-
You can update both property arrays with either `_PUSH` or `_POP` operators at once:
417-
418-
.Mutation with both a `_PUSH` and a `_POP`
419-
====
420-
[source, graphql, indent=0]
421-
----
422-
mutation {
423-
updateMovies (update: { tags_POP: 1, moreTags_PUSH: "a different tag" }) {
424-
movies {
425-
title
426-
tags
427-
moreTags
428-
}
429-
}
430-
}
431-
----
432-
433-
[col=1,1]
434-
|===
435-
| Before | After
436-
437-
a|
438-
```
439-
tags: ['some tag']
440-
moreTags: []
441-
```
442-
443-
a|
444-
```
445-
tags: []
446-
moreTags ['a different tag']
447-
```
448-
|===
449-
====
450-
451401
== Mathematical operators
452402

453403
You can use mathematical operators to update numerical fields based on their original values in a single DB transaction.

0 commit comments

Comments
 (0)