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

enable batch execution #1971

Merged
merged 2 commits into from
Sep 1, 2020
Merged

enable batch execution #1971

merged 2 commits into from
Sep 1, 2020

Commits on Aug 31, 2020

  1. enable batch execution

    When `batch` is set to true for a given subschemaConfig, batches all delegated root fields into a combined request passed to the executor. Moreover, batches all requests to a given subschema into the minimum number of requests, collecting queries and mutations separately, preserving operation order. Distributes properly pathed errors to the originating requests.
    
    Adapted from Gatsby query batcher by @vladar.
    
    Caveats:
    * Uses a Dataloader under the hood, which is created anew upon each request -- relies on a unique context argument per request to make this happen!
    * Passed `info` argument from first executor call to the batched executor call, making info argument unreliable.
    
    Related:
    
    gatsbyjs/gatsby#22347 (comment)
    #1710 (comment)
    #1959 (comment)
    #1954
    yaacovCR committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    9ac01e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    beac615 View commit details
    Browse the repository at this point in the history