diff --git a/modules/ROOT/pages/mutations/update.adoc b/modules/ROOT/pages/mutations/update.adoc index 83d05f57..bb4ffc1f 100644 --- a/modules/ROOT/pages/mutations/update.adoc +++ b/modules/ROOT/pages/mutations/update.adoc @@ -398,56 +398,6 @@ a| |=== ==== -=== Mixing `_PUSH` and `_POP` - -It is possible to perform both a `_PUSH` and `_POP` operation in one single `update` mutation. - -Consider the following type definitions: - -[source, graphql, indent=0] ----- -type Movie { - title: String - tags: [String] - moreTags: [String] -} ----- - -You can update both property arrays with either `_PUSH` or `_POP` operators at once: - -.Mutation with both a `_PUSH` and a `_POP` -==== -[source, graphql, indent=0] ----- -mutation { - updateMovies (update: { tags_POP: 1, moreTags_PUSH: "a different tag" }) { - movies { - title - tags - moreTags - } - } -} ----- - -[col=1,1] -|=== -| Before | After - -a| -``` - tags: ['some tag'] - moreTags: [] -``` - -a| -``` - tags: [] - moreTags ['a different tag'] -``` -|=== -==== - == Mathematical operators You can use mathematical operators to update numerical fields based on their original values in a single DB transaction.