Skip to content

Commit 138188b

Browse files
committed
Demonstrate issue with failing test
1 parent da685ee commit 138188b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/type/__tests__/definition-test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,22 @@ describe('Type System: Input Objects', () => {
818818
);
819819
});
820820
});
821+
822+
describe('Deprecation reason is preserved on fields', () => {
823+
const inputObjType = new GraphQLInputObjectType({
824+
name: 'SomeInputObject',
825+
fields: {
826+
deprecatedField: {
827+
type: ScalarType,
828+
deprecationReason: 'not used anymore',
829+
},
830+
},
831+
});
832+
const config = inputObjType.toConfig();
833+
expect(config.fields.deprecatedField.deprecationReason).to.equal(
834+
'not used anymore',
835+
);
836+
});
821837
});
822838

823839
describe('Type System: List', () => {

0 commit comments

Comments
 (0)