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

Closed
rsill-neo4j opened this issue Oct 17, 2024 · 1 comment · Fixed by #5693
Closed

Combining PUSH and POP in update mutations #5671

rsill-neo4j opened this issue Oct 17, 2024 · 1 comment · Fixed by #5693
Assignees
Labels
bug Something isn't working confirmed Confirmed bug

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 Something isn't working label Oct 17, 2024
@darrellwarde darrellwarde added the confirmed Confirmed bug label Oct 22, 2024
@neo4j-team-graphql
Copy link
Collaborator

We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @rsill-neo4j! 🙏 We will now prioritise the bug and address it appropriately.

angrykoala added a commit that referenced this issue Oct 23, 2024
angrykoala added a commit that referenced this issue Oct 23, 2024
@darrellwarde darrellwarde linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants