fix(10.x.x): custom union lookup on deprecated properties (#2178)#2186
Merged
samuelAndalon merged 1 commit intoJun 18, 2026
Merged
Conversation
auto-merge was automatically disabled
June 18, 2026 16:15
Pull request was converted to draft
samuelAndalon
approved these changes
Jun 18, 2026
…xpediaGroup#2178) ## Problem Custom union annotations can be missed when they are used on a property that also has another annotation, such as @deprecated. This leads to a failing build job and user can't deprecate the union below. ```kotlin @GraphQLUnion( name = "ToolbarAction", possibleTypes = [IconButton::class, TextButton::class] ) annotation class ToolbarAction data class Sheet( @deprecated("Use toolbar instead") @ToolbarAction val actions: List<Any> ) ``` The current ```kotlin annotations .map { it.getMetaUnionAnnotation() } .firstOrNull() ``` returns `null` as result and missing the ToolbarAction and fail build job. ## Approach Skip annotations that do not contain a meta-union and use the first actual match. This keeps the existing behavior for direct @GraphQLUnion annotations and for fields without custom unions, while allowing deprecated custom-union properties to generate the expected union field and preserve the deprecation reason. --------- Co-authored-by: sjin <sjin@expediagroup.com>
9b19b1a to
33f81f0
Compare
samuelAndalon
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry pick #2178 to
v10.x.xbranch.