Skip to content

DataLoader 3.x will not be upgraded in graphql-java 17.0 #98

Closed

Description

@bbakerman

The latest version of java DataLoader is 3.1

The 3.x version adds a new and long desired capability - a proper ValueCache

The previous CacheMap (which come from the original Vertx port) was not a value cache at all - it was a cache of promises to values

As such it cant be serialised into a network shared cache like REDIS or Memcached say.

The 3.x code base set out fix that and did.

However we missed and important problem. Introducing an async get to the ValueCache meant that previous garuantees
that once dataloader.get(...) was called then the request has been placed into the batch queue and hence can be optimally batched.

This led to #90 - aka the dreaded "when its the right time to batch" problem

There is a PR up to fix this and it will BUT it may also introduce other problems, like premature batcing.

As such we have decided to NOT upgrade graphql-java 17.0 to DataLoader 3.x and we need to reconsider how we improve this situation

The 3.x version right now is not optimal - it will work (especially if the new ScheduledDataLoaderRegistry is used) however this approach needs revision on reflection.

Stay tuned...

Activity

  1. bbakerman commented on Aug 8, 2021

    @bbakerman
    MemberAuthor

    #99

    is a PR that I think will allow DataLoader 3.x be used with graphql-java

  2. bbakerman commented on Aug 19, 2021

    @bbakerman
    MemberAuthor

    This has now been updated in 17.1 of graphql-java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions