apollo-datasource-cosmosdb
apollo-datasource-cosmosdb copied to clipboard
[Feature Request] Expose the Dataloader API options
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
}
}
}