Skip to content

Mutations execution strategy #97

Closed

Description

@drkarl

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?

Activity

  1. kirpi4ik commented on Mar 10, 2016

    @kirpi4ik

    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.

  2. oembedler commented on Mar 12, 2016

    @oembedler

    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

  3. andimarek commented on Mar 13, 2016

    @andimarek
    Member

    @oembedler is right: See http://facebook.github.io/graphql/#sec-Evaluating-operations

    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.

  4. danielkwinsor commented on May 8, 2016

    @danielkwinsor
    Contributor

    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.

  5. dminkovsky commented on Nov 15, 2016

    @dminkovsky
    Contributor

    Following up on #208. Closing this. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions