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

Disable old media field GraphQL fields by default. #16546

Merged
merged 4 commits into from
Aug 11, 2024

Conversation

gvkries
Copy link
Contributor

@gvkries gvkries commented Aug 9, 2024

#15003 introduced a new GraphQL type files to group all media item properties together. However, the old fields were left intact, resulting in duplicated fields. This PR removes the old fields by default but provides a compatibility switch to restore them if needed.

As suggested by @sebastienros, I added an AppContext switch to handle this. However, this is the first time we're using an AppContext switch, as far as I can tell. We may need to discuss whether this is the best approach or if we should consider an alternative.

/cc @MikeAlhayek @Piedone @hyzx86

@hyzx86
Copy link
Contributor

hyzx86 commented Aug 9, 2024

I have an idea that at some stage we could use DeprecationReason() to describe the graphql field that is about to be removed

@gvkries
Copy link
Contributor Author

gvkries commented Aug 9, 2024

I have an idea that at some stage we could use DeprecationReason() to describe the graphql field that is about to be removed

That's a good suggestion. But in the case of 2.0, we already have breaking changes in the GraphQL schema, so I think it's worth taking this change as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants