-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Replace resolved types in lexicographic schema sort #2779
Replace resolved types in lexicographic schema sort #2779
Conversation
@mattleff Very interesting bug, once review comments are addressed I will merge it as a temporary fix. |
@mattleff Thinking more about it it's better to have this temporary workaround directly inside |
@IvanGoncharov Ok, I'll see if I can implement it in |
@IvanGoncharov I've pushed that change. Are you good with the current tests or is there a better place or method for testing this? |
@mattleff Midnight in my location 🛏️ |
@mattleff You can use our NPM branch for tests: |
@IvanGoncharov That works great. Thanks for all your work to square this away! |
When using
lexicographicSortSchema()
with a schema containingresolveType
for either interfaces or unions the resolved type wasn't being replaced with the newGraphQLObjectType
created during sorting. This PR wraps anyresolveType
functions provided and substitutes the sorted named type for the type returned from theresolveType
function.Downstream issue: nestjs/graphql#1107