Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ResolveReference() not supported #120

Open
psteinroe opened this issue Jun 2, 2021 · 3 comments
Open

@ResolveReference() not supported #120

psteinroe opened this issue Jun 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@psteinroe
Copy link
Contributor

psteinroe commented Jun 2, 2021

Hi,

it seems like that the @ResolveReference() decorator is currently not supported. It is not picked up and added to the server.

I am trying to work on that, but if you have any idea where the problem is let me know! :)

@Davide-Gheri Davide-Gheri added the bug Something isn't working label Jun 4, 2021
@Davide-Gheri
Copy link
Owner

Yes you're right.
We use @graphql-tools/schema makeExecutableSchema (or to be more precise, @nestjs/graphql uses it) to create the schema but it doesn't support graphql properties like __resolveReference, that's why apollo (and @nestjs/graphql GraphQLFederationModule) uses a custom function buildFederatedSchema to add this props.

We should manually add them in our GraphQLFactory somewhere before the transformFederatedSchema.

or as a nasty fix maybe we could simply call @nestjs/graphql GraphQLFederationFactory.mergeOptions instead of the simple GraphQLFactory one and then use the Apollo buildFederatedSchema function.

@ResolveReferenceLoader should not be affected by all of this and should keep working as always

@vabatta
Copy link

vabatta commented Jul 1, 2021

So this means I can use @ResolveReferenceLoader instead of @ResolveReference for a working schema?

@Davide-Gheri
Copy link
Owner

@vabatta yes, exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants