You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server shouldn't look for a parameterized @external resolver method #781
But it should not expect a separate resolver method for the weight field since it is marked @external, meaning this subgraph cannot resolve it. Instead, it should just expect a plain old weight field as part of the Product class, and assume that some other subgraph will resolve it:
The field is needed so that the entity resolver can fill in the result of the external weight resolver into the Product model, and also so that this subgraph can read it during subsequent query processing.
Closing as not planned. graphql-java-tools doesn't know about federation directives, and a property can't take arguments, so a field with arguments needs a method. You can add getWeight(String units) to Product, or set a missingResolverDataFetcherProvider that reads the property for @external fields and still fails the build for anything else:
SchemaParserOptions.newOptions()
.missingResolverDataFetcherProvider { field, _ ->if (field.hasDirective("external")) PropertyDataFetcher<Any>(field.name)
elsethrowIllegalStateException("No resolver for field ${field.name}")
}
It also works with Fed 2 @link imports when allowUndeclaredDirectives(true) is set.
Activity
oryan-block commentedon Oct 18, 2026
Closing as not planned. graphql-java-tools doesn't know about federation directives, and a property can't take arguments, so a field with arguments needs a method. You can add
getWeight(String units)toProduct, or set amissingResolverDataFetcherProviderthat reads the property for@externalfields and still fails the build for anything else:It also works with Fed 2
@linkimports whenallowUndeclaredDirectives(true)is set.