You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any technical reason why mutation execution strategy is hardcoded to SimpleExecutionStrategy? Couldn't it use the same strategy used for datafetchers or another one, also specified when building the schema?
Good question, it is definitely something wrong. We had to debug graphQL code to realize that our custom execution strategy was not used for mutations(no exceptions, no log).
Creating hardcoded new instance of SimpleExecutionStrategy inside Execution is weird, more than that our custom execution strategy is already extending SimpleExecutionStrategy.
So if mutation really need to use different strategy at least it must be passed as parameter to GraphQL and not being hardcoded in the Execution.
SimpleExecutionStrategy only used to execute actual mutation (it can not be calculated concurrently for instance) - however all other nested fields are resolved using provided custom strategy. see this
If the operation is a mutation, the result of the operation is the result of evaluating the mutation’s top level selection set on the “Mutation Root” object. This selection set should be evaluated serially.
As everyone has said, top level mutations must be serial. Are you observing that second level mutations are not using your custom execution strategy? If your custom execution strategy is being used, we should close this.
Activity
kirpi4ik commentedon Mar 10, 2016
Good question, it is definitely something wrong. We had to debug graphQL code to realize that our custom execution strategy was not used for mutations(no exceptions, no log).
Creating hardcoded new instance of SimpleExecutionStrategy inside Execution is weird, more than that our custom execution strategy is already extending SimpleExecutionStrategy.
So if mutation really need to use different strategy at least it must be passed as parameter to GraphQL and not being hardcoded in the Execution.
oembedler commentedon Mar 12, 2016
SimpleExecutionStrategyonly used to execute actual mutation (it can not be calculated concurrently for instance) - however all other nested fields are resolved using provided custom strategy.see this
andimarek commentedon Mar 13, 2016
@oembedler is right: See http://facebook.github.io/graphql/#sec-Evaluating-operations
danielkwinsor commentedon May 8, 2016
As everyone has said, top level mutations must be serial. Are you observing that second level mutations are not using your custom execution strategy? If your custom execution strategy is being used, we should close this.
dminkovsky commentedon Nov 15, 2016
Following up on #208. Closing this. Thank you.