Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining PUSH and POP in update mutations #5671

Open
rsill-neo4j opened this issue Oct 17, 2024 · 0 comments
Open

Combining PUSH and POP in update mutations #5671

rsill-neo4j opened this issue Oct 17, 2024 · 0 comments
Labels
bug report Something isn't working

Comments

@rsill-neo4j
Copy link

While reading the docs about combining PUSH and POP in update mutations (https://neo4j.com/docs/graphql/5/mutations/update/#_combined_methods), the question arose if it's possible to combine a POP and a PUSH on the same array in a single mutation, for example to update an array ['a', 'b', 'c'] to ['a', 'b', 'd'] (tags array, see below) in a single mutation:

mutation {
    updateMovies (update: { tags_POP: 1, tags_PUSH: "d" }) {
        movies {
            title
            tags
        }
    }
}

the order is essential, since a PUSH followed by a POP would leave the array unchanged.
however, apparently no matter the order of the POP and PUSH operations inside "update", that is exactly what happens - the array doesn't change.

does PUSH take precedence? are the operations in "update" unordered?

is this a potential bug?

@rsill-neo4j rsill-neo4j added the bug report Something isn't working label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant