spring-projects / spring-projects/spring-graphql

Looking for advice on DGS DataLoader migration

Open
#1,233 4 comments 1 reaction 1 assignee View on GitHub

@rstoyanchev is already working on this.

Since Jul 17, 2025.

type: enhancement
Dominant language
Java
Stars
1.6k
Forks
336
PR merge metrics
No merged PRs in 30d

Description

Hi Spring GraphQL Team,

We're migrating from Netflix DGS to Spring GraphQL and have questions about DataLoader.

  • @SchemaMapping Argument Resolution Validation: When using a DataLoader within a @SchemaMapping method, how can we ensure mismatches between the DataLoader name (registered via BatchLoaderRegistry.forName()) and the method's parameter name intended for keys are caught at compile or startup time, rather than runtime?
  • Bean-based DataLoaders: Is there a recommended way to register DataLoaders as Spring beans, similar to DGS's @DgsDataLoader annotation, for easier management and auto-registration?

Any guidance on these points for a smoother migration would be appreciated.
Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.