-
Notifications
You must be signed in to change notification settings - Fork 257
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
fix(subgraph): Preserve resolveReference
fns during schema transforms
#1131
Comments
@martijnwalraven pointed out in ardatan/graphql-tools#2857 (comment) that this would be a backwards-incompatible change, but I suspect it is fine to make it (and bump the 0.x version). If for some reason that's not ok, we could put the fields on both places and just document the old way as deprecated and not preserved by things like mapSchema. We should consider taking the advice on the doc comment on graphql-js |
I haven't validated the workaround myself, but I figure it's worth sharing if anyone finds themselves running into this issue - could be worth a shot. Thanks to @vad3x for providing it. |
Hi @trevor-scheer, any updates? |
@vad3x no update yet. This is one of those things I'd love to get to, but no idea when. Open to assisting with a PR though! |
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
Currently
resolveReference
andresolveObject
are special properties onGraphQLObjectType
s which don't obey the type system / public API. We should investigate moving these properties to theextensions
object so they are preserved through normal usage of the public API (i.e. callingtoConfig()
on the object.Ref: ardatan/graphql-tools#2687
The text was updated successfully, but these errors were encountered: