i have federated services connected via apollo studio, using @apollo/subgraphs, localy on each services represendations resolvers are resolving unique @keys and also on the federation service when i run any query that use the representation keys it is resolved, when i try to resolve the rest of the external property of a type on the federation service it fails, but the key is available and tried testing to see if the __resolveReference was call and it is not called.
Please see rest of the images on the comment
Hello! To confirm, does your companyService.getCompany()
call return an object that includes an id
field for the Company
? The error shown in the explorer suggests that the query planner is correctly sending a followup query to fetch Company
entity fields (that’s what _entities
under path
indicates), but the required id
field is missing from the response.
Additionally, could you share your Company
entity definitions across your various subgraph schemas? That appears to be the entity that is causing issues, as opposed to News
.
Thank you for your response,
i was able to fix this, the problem was the reference resolvers weren’t included properly, using addResolversToSchema
method provided by apollo-graphql
, i was able to call the reference resolvers