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/auto execute #10

Merged
merged 6 commits into from
Jun 29, 2021
Merged

Feature/auto execute #10

merged 6 commits into from
Jun 29, 2021

Conversation

NeedleInAJayStack
Copy link
Member

New features:

  • It adds support for concurrent access to the DataLoaders, which is important as GraphQL resolvers fan out asynchronously. This makes it possible to use a single DataLoader across all resolvers, which gets us the largest benefit from the caching and batching capabilities.
  • DataLoader instances now have an executionPeriod option (enabled by default) that schedules an automatic execution of the queue, which was requested in Schedule batch loading #7. This means the client no longer has to call dispatchQueue (now execute) manually, which was difficult to do efficiently across GraphQL resolvers. The API here is inspired by the go version.
  • An example using Graphiti and DataLoader was added to the readme

Apart from that, there's some minor refactoring and renaming.

Note that this does change the public API, so it should result in a major version increment.

Copy link
Member

@paulofaria paulofaria left a comment

Choose a reason for hiding this comment

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

Brilliant work!

@NeedleInAJayStack NeedleInAJayStack merged commit 3d34c1b into GraphQLSwift:master Jun 29, 2021
@NeedleInAJayStack NeedleInAJayStack deleted the feature/autoExecute branch June 29, 2021 23:39
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.

2 participants