-
-
Notifications
You must be signed in to change notification settings - Fork 821
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
mapSchema() wipes out federated schema resolveReference()
function
#2687
Comments
Thanks for the reporting this missing feature. Would you create a draft PR then we can help you? |
Unfortunately, I don't have the bandwidth or background on your code base to fix this issue. I know it is happening, but not why. |
Is there any workaround for this? |
The fix would be for Apollo federation to use extensions to extend the schema with metadata instead of custom properties. A workaround would involve copying the custom federation stuff like resolveReference and whatever else from the old schema to the mapped schema... |
This is not a bug in graphql tools. It is a feature request to handle the custom GraphQLSchema objects created by Apollo... we could try to do that, but we would need to investigate what hidden metadata they are using. It’s not our code base that you need to be familiar with to help fix this, it’s Apollo’s... |
I understand that this is not an issue with I have a simple patch to fix my immediate issue, i.e. propagating these two fields as part of Should I submit a PR? |
Sure, thanks!!! We love PRs :) |
I just found this same exact issue occurs if you use |
@robross0606 You can use |
I am having the same issue. When I and using |
Is there any workaround at all for this? |
There is a workaround here https://community.apollographql.com/t/are-object-resolvers-broken-with-custom-schema-directives/1578/4 |
The entity __resolveReference resolver is currently placed directly on to GraphQL*Type objects. This breaks the API, as the expectation is to put things like this on to the `extensions` field of objects contained within a GraphQLSchema. This moves the resolver off of the object and into the extensions where it belongs. Fixes: #1131 Fixes: ardatan/graphql-tools#2687 Fixes: ardatan/graphql-tools#2857
The entity __resolveReference resolver is currently placed directly on to GraphQL*Type objects. This breaks the API, as the expectation is to put things like this on to the `extensions` field of objects contained within a GraphQLSchema. This moves the resolver off of the object and into the extensions where it belongs. Fixes: #1131 Fixes: ardatan/graphql-tools#2687 Fixes: ardatan/graphql-tools#2857
The entity __resolveReference resolver is currently placed directly on to GraphQL*Type objects. This breaks the API, as the expectation is to put things like this on to the `extensions` field of objects contained within a GraphQLSchema. This moves the resolver off of the object and into the extensions where it belongs. Fixes: #1131 Fixes: ardatan/graphql-tools#2687 Fixes: ardatan/graphql-tools#2857
#1747) The entity __resolveReference resolver is currently placed directly on to GraphQL*Type objects. This breaks the API, as the expectation is to put things like this on to the `extensions` field of objects contained within a GraphQLSchema. This moves the resolver off of the object and into the extensions where it belongs. Fixes: #1131 Fixes: ardatan/graphql-tools#2687 Fixes: ardatan/graphql-tools#2857
@ardatan I think this issue can be closed out as well. |
Describe the bug
When applying
mapSchema()
to a federated schema, anyresolveReference
functions on types are wiped out.To Reproduce
The following Jest test shows that even a NooP transform using
mapSchema()
wipes out the federatedresolveReference
function.Expected behavior
One would expect mapping a schema should pass thru anything not specifically mapped.
Environment:
@graphql-tools/utils
: 7.5.0The text was updated successfully, but these errors were encountered: