From ba9ead86642d5f8720a4c200d8b2f68e6c987847 Mon Sep 17 00:00:00 2001
From: Yaacov Rydzinski <yaacovCR@gmail.com>
Date: Thu, 23 Jan 2025 19:29:48 +0200
Subject: [PATCH] add example for type system directive arguments

---
 .../__tests__/ValuesOfCorrectTypeRule-test.ts | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts b/src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts
index 9631c1ae05..687626777d 100644
--- a/src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts
+++ b/src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts
@@ -1204,6 +1204,31 @@ describe('Validate: Values of correct type', () => {
     });
   });
 
+  describe('Type system directive arguments', () => {
+    it('with directives of valid types', () => {
+      expectValid(`
+        interface Mammal {
+          mother: Mammal @deprecated(reason: "Some reason.")
+          father: Mammal
+        }
+      `);
+    });
+
+    it('with directive with incorrect types', () => {
+      expectErrors(`
+        interface Mammal {
+          mother: Mammal @deprecated(reason: 5)
+          father: Mammal
+        }
+      `).toDeepEqual([
+        {
+          message: 'String cannot represent a non string value: 5',
+          locations: [{ line: 3, column: 46 }],
+        },
+      ]);
+    });
+  });
+
   describe('Variable default values', () => {
     it('variables with valid default values', () => {
       expectValid(`