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
NOTE: this is a duplicate of #1383, but since I'm unable to re-open the issue I've recreated it here. Feel free to close this one as duplicate and re-open the original on my behalf to continue the discussion there.
Take a look at the following example in the Apollo documentation.
Currently, this would generate a set of classes as follows:
But it should not generate a separate IProductResolver interface for the weight field since it is marked @external, meaning this subgraph cannot resolve it. Instead, it should just generate a plain old field as part of the Product class, and assume that some other subgraph will resolve it:
Setting generateParameterizedFieldsResolvers to false does indeed generate the java type correctly, but the plugin should be smart enough to realize that @external parameterized fields can't possibly be resolved by the current subgraph and so should automatically be omitted from resolver method generation even when generateParameterizedFieldsResolvers is set to true.
EDIT: I realize now that the server behavior isn't controlled by this plugin, so I've opened a sister ticket there.
The text was updated successfully, but these errors were encountered:
gzak
changed the title
parameterized @external field resolver should not generate resolver methods[Short Description]
parameterized @external field resolver should not generate resolver methods
Jan 8, 2024
Issue Description
NOTE: this is a duplicate of #1383, but since I'm unable to re-open the issue I've recreated it here. Feel free to close this one as duplicate and re-open the original on my behalf to continue the discussion there.
Take a look at the following example in the Apollo documentation.
Currently, this would generate a set of classes as follows:
But it should not generate a separate
IProductResolver
interface for theweight
field since it is marked@external
, meaning this subgraph cannot resolve it. Instead, it should just generate a plain old field as part of theProduct
class, and assume that some other subgraph will resolve it:Setting
generateParameterizedFieldsResolvers
tofalse
does indeed generate the java type correctly, but the plugin should be smart enough to realize that@external
parameterized fields can't possibly be resolved by the current subgraph and so should automatically be omitted from resolver method generation even whengenerateParameterizedFieldsResolvers
is set totrue
.EDIT: I realize now that the server behavior isn't controlled by this plugin, so I've opened a sister ticket there.
The text was updated successfully, but these errors were encountered: