Skip to content

LightDataFetcher implementation not getting executed as intended #3650

Open
@shalearkane

Description

@shalearkane

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    keep-openTells Stale Bot to keep PRs and issues open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions