Skip to content

Support custom argument resolvers for @EntityMapping - #1568

Open
2748109647 wants to merge 1 commit into
spring-projects:mainfrom
2748109647:feature/gh-1567-federation-custom-argument-resolver
Open

2748109647 wants to merge 1 commit into
spring-projects:mainfrom
2748109647:feature/gh-1567-federation-custom-argument-resolver

Conversation

@2748109647

Copy link
Copy Markdown

Fixes #1567

Problem

FederationSchemaFactory builds a fixed argument resolver list, so custom argument types available to regular @SchemaMapping methods cannot be resolved by @EntityMapping methods.

Changes

  • Add addCustomArgumentResolver to FederationSchemaFactory, with custom resolvers ordered after the built-in resolvers.
  • Add an end-to-end _entities regression test using a custom resolver.
  • Document the registration method and its initialization timing.

Compatibility

Existing behavior and built-in resolver ordering are unchanged unless a custom resolver is explicitly registered. Register custom resolvers before afterPropertiesSet().

Validation

  • ./gradlew :spring-graphql:test --tests 'org.springframework.graphql.data.federation.EntityMappingInvocationTests' --no-daemon --console=plain — passed (12 tests).
  • ./gradlew :spring-graphql:checkstyleMain :spring-graphql:checkstyleTest --no-daemon --console=plain — passed.
  • git diff --check — passed.

Signed-off-by: Alpha <2748109647@qq.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support custom HandlerMethodArgumentResolver registration in FederationSchemaFactory

2 participants