Skip to content

Commit 8351f45

Browse files
authored
Merge pull request #206 from neo4j/apply-removal-of-mixing-PUSH-and-POP-section-to-6.x
resolved merge conflict
2 parents a7c629f + eadfa20 commit 8351f45

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
@@ -394,56 +394,6 @@ a|
394394
|===
395395
====
396396

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

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

0 commit comments

Comments
 (0)