[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

LightDataFetcher implementation not getting executed as intended #3650

Open
shalearkane opened this issue Jun 28, 2024 · 1 comment
Open
Labels
keep-open Tells Stale Bot to keep PRs and issues open

Comments

@shalearkane
Copy link
shalearkane commented Jun 28, 2024

Describe the bug
This condition in ExecutionStrategy:invokeDataFetcher():

if (dataFetcher instanceof LightDataFetcher) {

is evaluating to False even if the dataFetcher is actually created by implementing LightDataFetcher interface.

I have tried to debug why it is so, and I found this object being passed as datafetcher to the invokeDataFetcher function which is being evaluated as not a LightDataFetcher:
image

Context
I am creating a LightOperationExecutor as a lightweight alternative to OperationExecutor in GraphQL-SPQR by implementing LightDataFetcher. Open PR #502

To Reproduce
To reproduce, checkout commit 05642488bc and run test in Maven. You should see the tests SchemaTest.testSchema and RelayTest.testRelayMutations produce errors.

Note that even though the commit uses GraphQL-Java 21.3, this is also reproducible on 22.1 (latest), however in this situation we have this datafetcher object,
image

@shalearkane
Copy link
Author

I think that this might not be bug if the intention behind LightDataFetcher is just to have an additional behavior of getting results if the environment is passed through a Supplier<> and should always have a way getting results as a regular ("heavy") datafetcher.

@dondonz dondonz added the keep-open Tells Stale Bot to keep PRs and issues open label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-open Tells Stale Bot to keep PRs and issues open
Projects
None yet
Development

No branches or pull requests

2 participants