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

[Feature Request] Expose the Dataloader API options #65

Open
elbasan opened this issue Feb 21, 2022 · 0 comments
Open

[Feature Request] Expose the Dataloader API options #65

elbasan opened this issue Feb 21, 2022 · 0 comments

Comments

@elbasan
Copy link

elbasan commented Feb 21, 2022

We recently had this issue where the CosmosDB query length limit exceeded.

To fix this, we had to write our own wrapper to set the maxBatchSize option to limit the number of request that get queued into one batch request, as we currently can't set this option in apollo-datasource-cosmosdb.

Is it possible to add the ability to set the Dataloader options?

For example:

class Data extends CosmosDataSource<Container, ApolloContext> {

  constructor(container: Container, options: CosmosDataSourceOptions) {
    super(container, options);

    this.options.dataloader = {
      maxBatchSize: 1000,
      ... // other Dataloader options https://github.com/graphql/dataloader#class-dataloader
    }
  }

}

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

No branches or pull requests

1 participant