#Challenge with Dataloader resolverReference not called

2 messages · Page 1 of 1 (latest)

rigid jewel
#

In Graphql Federation using Nestjs, Mercurius and Dataloader functionality I am unable to call __resolverReference function present in Dataloader. Dataloader service is instantiating correctly but other functions are called except __resolveReference one. As instructed I have added following resolver for reference field like below

@ResolveReference() public async resolveReference(reference: IReference): Promise<User> { return; }

#

Below is the getLoaders section where the actual logic for fetching resource is applied.

public getLoaders() { return { User: { __resolveReference: this.userRelationLoader(), }, }; }