Skip to main content

graphql_data_loader2 8.0.0 copy "graphql_data_loader2: ^8.0.0" to clipboard
graphql_data_loader2: ^8.0.0 copied to clipboard

Batch and cache database lookups. Works well with GraphQL. Ported from JS.

Change Log #

8.0.0 #

Breaking changes in 8.0.0 #

  • Breaking: load throws a StateError after close, and close also clears the cache. Pending loads fail with a StateError that is not reported as uncaught if nobody awaits them.
  • Breaking: If loadMany throws, or returns more or fewer values than keys, every load in that batch fails with the error. Before, those loads never completed and the loader stopped working.
  • Breaking: Loading a key again while it is being loaded returns the same Future instead of fetching it a second time.

Fixes in 8.0.0 #

  • Batching: A load made while a batch is running is sent in the next batch. Before, it never completed unless another load came later.
  • Errors: A failed lookup is not cached, so loading the key again retries it.
  • Cache: prime does nothing when cache is false or the loader is closed, instead of keeping values that are never read.
  • Performance: A batch's results are read once and matched to their keys directly, instead of scanning the queue for each key.
  • Example: The todo field returns a single Todo, matching its resolver.

7.0.0 #

  • Require Dart >= 3.13
  • Updated graphql_schema2 to 7.0.0

6.5.0 #

  • Require Dart >= 3.9

6.4.0 #

  • Require Dart >= 3.8
  • Updated lints to 6.0.0
  • Updated dependencies to the latest release

6.3.0 #

  • Require Dart >= 3.6
  • Updated lints to 5.0.0

6.2.0 #

  • Require Dart >= 3.3
  • Updated lints to 4.0.0

6.1.0 #

  • Updated lints to 3.0.0
  • Fixed linter warnings
  • Updated repository link

6.0.0 #

  • Require dart >= 3.0.x

5.0.0 #

  • Require dart >= 2.17.x

4.0.0 #

  • Require dart >= 2.16.x

3.0.0 #

  • Updated to SDK 2.15.x

2.1.0 #

  • Upgraded from pendantic to lints linter

2.0.0 #

  • Migrated to support Dart SDK 2.12.x NNBD
  • Rename data_loader to graphql_data_loader2

1.0.0 #

  • Initial version.
1
likes
160
points
783
downloads

Documentation

API reference

Publisher

verified publisherdukefirehawk.com

Weekly Downloads

Batch and cache database lookups. Works well with GraphQL. Ported from JS.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

BSD-3-Clause (license)

More

Packages that depend on graphql_data_loader2