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

feat(add dataloader options) #10

Merged
merged 1 commit into from
May 16, 2022
Merged

feat(add dataloader options) #10

merged 1 commit into from
May 16, 2022

Conversation

mattkrick
Copy link
Member

you can now pass in dataLoaderOptions via context.

example:

const resolveEndpointContext = () => {
  return {dataLoaderOptions: {maxBatchSize: 1}}

this will limit a batch size to 1, which means every request will get sent on its own.
you can come up with a better strategy & employ that. see https://github.com/graphql/dataloader#batch-scheduling

Copy link

@nickoferrall nickoferrall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working for me!

@Dschoordsch Dschoordsch merged commit a67ec82 into main May 16, 2022
@mattkrick mattkrick deleted the add-options branch August 2, 2024 19:03
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

Successfully merging this pull request may close these issues.

3 participants