Closed ydomenjoud closed 1 year ago
@ydomenjoud thank you for such a good description. I'll try to sort it out a bit later and make you know once it's done.
@ydomenjoud this issue was fixed as part of 0.8.1 version. Please consider to upgrade to the latest version 0.8.2, it also include vulns fixes.
@ydomenjoud thank you for the description once again. I've added new section to readme related to federation and used your description there.
This issue was closed as it was fixed as part of 0.8.1 version.
First of all, specials thanks for this awesome library.
Describe the bug With Graphql Federation, you use @ResolveReference to resolve a reference to an entity. Unfortunately, @GraphqlLoader() and @Loader() annotations doesn't work with @ResolveReference. I ran into this error :
It seems to be related to line 96 in loader.ts , where ctx.getArgs() have different shape with graphql federation :
On federated graph, req is in args[1] and info in args[2] . Theses updates solved my issue :
To Reproduce Steps to reproduce the behavior:
npm i nestjs-graphql-tools
inusers-application
users-application/src/users/users.resolver.ts
users-application/src/users/users.service.ts
:npm ci
in gateway, posts-application, users-applicationcd users-application && npm run start
cd posts-application && npm run start
cd gateway && npm run start
Expected behavior We expect no error and result return from the gateway
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context we can use also fieldName to search if this is a FederatedGraph by looking info.fieldName='_entities' too, or testing info.path.prev === undefined