Skip to content

Support DataLoader argument in @EntityMapping methods  #1095

Closed
@rstoyanchev

Description

@rstoyanchev

@EntityMapping methods support a method signature with a list of argument id's as input and returning a list of entities as output. This allows loading all entities at once much like @QueryMapping methods.

Users migrating from GraphQL Java Kickstart previously used a DataLoader in entity resolvers, and would like to be able to do the same. We should explore the option to support injecting a DataLoader argument. This could be as simple as adding DataLoaderMethodArgumentResolver to the list of resolvers, but need to experiment.

This is based on discussion below #1023 (comment).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions