File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
test/unit/should_annotate_types_properly Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ export function buildDirectiveAnnotations(
3939 deprecatedReasonNode ?. kind === "StringValue"
4040 ? deprecatedReasonNode . value
4141 : "" ;
42+ if ( incomingNode . description ?. value && resolvedType ?. unionAnnotation ) {
43+ return "" ;
44+ }
4245 const descriptionAnnotator = resolvedType ?. unionAnnotation
4346 ? "@GraphQLDescription"
4447 : "@Deprecated" ;
Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ data class MyType(
2222 val deprecated5 : Any? = null ,
2323 @MyUnion
2424 @GraphQLDescription(" It uses the GraphQLDescription annotation for union types" )
25- val deprecated6 : Any? = null
25+ val deprecated6 : Any? = null ,
26+ @MyUnion
27+ @GraphQLDescription(" When there is a description" )
28+ val deprecated7 : Any? = null
2629)
2730
2831@GraphQLUnion(
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ type MyType {
2424 @deprecated (
2525 reason : " It uses the GraphQLDescription annotation for union types"
2626 )
27+ "When there is a description"
28+ deprecated7 : MyUnion
29+ @deprecated (reason : " It omits the @Deprecated annotation for now" )
2730}
2831
2932union MyUnion = MyType
You can’t perform that action at this time.
0 commit comments