Skip to content

Commit

Permalink
fix: duplicated description annotation on union fields
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian committed Apr 3, 2024
1 parent 78a7316 commit 29be91a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit/should_annotate_types_properly/expected.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ data class MyType(
val deprecated5: Any? = null,
@MyUnion
@GraphQLDescription("It uses the GraphQLDescription annotation for union types")
val deprecated6: Any? = null
val deprecated6: Any? = null,
@MyUnion
@GraphQLDescription("When there is a description")
@Deprecated("It puts the deprecated reason in @Deprecated")
val deprecated7: Any? = null
)

@GraphQLUnion(
Expand Down
3 changes: 3 additions & 0 deletions test/unit/should_annotate_types_properly/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ type MyType {
@deprecated(
reason: "It uses the GraphQLDescription annotation for union types"
)
"When there is a description"
deprecated7: MyUnion
@deprecated(reason: "It puts the deprecated reason in @Deprecated")
}

union MyUnion = MyType

0 comments on commit 29be91a

Please sign in to comment.