Skip to content

Provide DataLoader registry #66

Description

@bkuberek

Currently, the GraphqlPostHandler constructs an ExecutionInput and executes the graphql query without providing an option for user provided DataLoaderRegistry

ExecutionInput executionInput = ExecutionInput.newExecutionInput().query(query).operationName(operationName).context(exchange).root(exchange).variables(variables).build();

When using DataLoader we need to set dataLoaderRegistry

ExecutionInput executionInput = newExecutionInput()
    .query(query)
    .operationName(operationName)
    .context(exchange)
    .root(exchange)
    .variables(variables)
    .dataLoaderRegistry(registry) // <---
    .build()

Alternatively, we should be able to use Instrumentation.instrumentExecutionInput(input, parameters), but there is a bug in graphql graphql-java/graphql-java#1667

It is still possible to do it via instrumentation but I think data loader registry could be added to router.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions