Skip to content

How to use the GraphQL Java Dataloader? #58

Answered by vojtapol
soudmaijer asked this question in Q&A
Discussion options

You must be logged in to vote

You can pass data loader registry when building ExecutionInput:

Builder executionInput = ExecutionInput.newExecutionInput()
    .dataLoaderRegistry(myRegistry)
    .query(query)
    .context(context);

This works as expected in GraphQL Java Tools. I would advise to make sure caching is either disabled or the whole registry is recreated for each request otherwise you might see invalid data being returned from the data loader.

Please open a new issue if you have more questions.

Replies: 74 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vojtapol
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pinguinjkeke
Comment options

Comment options

You must be logged in to vote
2 replies
@matsmad
Comment options

@schneiderlin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #58 on December 21, 2020 15:54.