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

chore: upgrade GraphQL to v16 #10052

Merged
merged 9 commits into from
Aug 1, 2024
Merged

chore: upgrade GraphQL to v16 #10052

merged 9 commits into from
Aug 1, 2024

Conversation

mattkrick
Copy link
Member

@mattkrick mattkrick commented Jul 30, 2024

Description

GraphQL v16 requires a few changes to our schema.
Primarily, resolveType needs to return a string.
This is handled by the new SDL pattern, so I just migrated all the conflicting types to the SDL pattern

Migrating to the SDL pattern can leave some type resolvers orphaned, for example if a resolver using the old pattern is not referenced by another file using the old pattern, then those resolvers won't get imported. This is pretty scary, and not something we want to handle by manually checking!

to combat this, i used a package called ts-unused-exports which finds exports in the graphql/types directory that are not used. Any unused default exports had to either be converted the SDL, or deleted if it did not contain any resolvers.

Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
@mattkrick mattkrick changed the title upgrade GraphQL to v16 chore: upgrade GraphQL to v16 Jul 31, 2024
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
@mattkrick mattkrick merged commit a27769c into master Aug 1, 2024
6 checks passed
@mattkrick mattkrick deleted the chore/graphql-upgrade branch August 1, 2024 00:00
@github-actions github-actions bot mentioned this pull request Aug 1, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant