@@ -627,12 +627,19 @@ describe('Schema Builder', () => {
627627 OTHER_VALUE @deprecated(reason: "Terrible reasons")
628628 }
629629
630+ input MyInput {
631+ oldInput: String @deprecated
632+ otherInput: String @deprecated(reason: "Use newInput")
633+ newInput: String
634+ }
635+
630636 type Query {
631637 field1: String @deprecated
632638 field2: Int @deprecated(reason: "Because I said so")
633639 enum: MyEnum
634640 field3(oldArg: String @deprecated, arg: String): String
635641 field4(oldArg: String @deprecated(reason: "why not?"), arg: String): String
642+ field5(arg: MyInput): String
636643 }
637644 ` ;
638645 const output = cycleOutput ( body ) ;
@@ -668,6 +675,20 @@ describe('Schema Builder', () => {
668675 const field4OldArg = rootFields . field4 . args [ 0 ] ;
669676 expect ( field4OldArg . isDeprecated ) . to . equal ( true ) ;
670677 expect ( field4OldArg . deprecationReason ) . to . equal ( 'why not?' ) ;
678+
679+ const myInput = schema . getType ( 'MyInput' ) ;
680+ const inputFields = myInput . getFields ( ) ;
681+
682+ const newInput = inputFields . newInput ;
683+ expect ( newInput . isDeprecated ) . to . equal ( false ) ;
684+
685+ const oldInput = inputFields . oldInput ;
686+ expect ( oldInput . isDeprecated ) . to . equal ( true ) ;
687+ expect ( oldInput . deprecationReason ) . to . equal ( 'No longer supported' ) ;
688+
689+ const otherInput = inputFields . otherInput ;
690+ expect ( otherInput . isDeprecated ) . to . equal ( true ) ;
691+ expect ( otherInput . deprecationReason ) . to . equal ( 'Use newInput' ) ;
671692 } ) ;
672693
673694 it ( 'Correctly assign AST nodes' , ( ) => {
0 commit comments