Closed ivome closed 5 years ago
@ivome thank you for this report! We will take a look!
@JacksonKearl did you fix this?
Not yet, fix seems to be to change
to
const keyFields = context.getKeyFields(parentType, parentGroup.serviceName);
But that breaks compound keys in an unexpected way. I think the @.federation.keys
dict isn't getting properly initialized for compound keys, or I'm misusing it.
I can't get the resolving of types in federated services to work that have multiple keys.
For example, when I have two services:
Service 1:
In service 2 I am trying to resolve the user by username:
The gateway tries to query the field
id
of theUser
type instead of theusername
in service 2 which doesn't even exist in the service schema.However, when I change the order of the key directives on the user type, it works. So it seems something in the gateway doesn't work quite right.
Here is repository with the adjusted demo repo that reproduces the behavior: https://github.com/ivome/federation-demo