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

wrong execution order of multiple mutations in one request #145

Closed
sfriedel opened this issue Jul 7, 2016 · 2 comments · Fixed by #493
Closed

wrong execution order of multiple mutations in one request #145

sfriedel opened this issue Jul 7, 2016 · 2 comments · Fixed by #493

Comments

@sfriedel
Copy link
Contributor

sfriedel commented Jul 7, 2016

The GraphQL spec states that mutations should be executed serially and in the order that they were specified.

Currently this isn't the case in graphql-go. Mutations are executed in random order (I'd guess they are stored in a map somewhere because order changes with every restart).

When evaluating a grouped field set serially, the executor must consider each entry from the grouped field set in the order provided in the grouped field set. It must determine the corresponding entry in the result map for each item to completion before it continues on to the next item in the grouped field set:

https://facebook.github.io/graphql/#sec-Serial-execution

@robermorales
Copy link

Something new about this?

@djmcgreal
Copy link

The problem is in executeFields(Serially), p.Fields is a map created by collectFields. Since Go iterates over maps in an arbitrary order, this isn't an approach that can be compatible with the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants