@@ -41,6 +41,14 @@ describe('Validate: Unique argument definition names', () => {
41
41
someField(foo: String): String
42
42
}
43
43
44
+ extend type SomeObject {
45
+ anotherField(foo: String): String
46
+ }
47
+
48
+ extend interface SomeInterface {
49
+ anotherField(foo: String): String
50
+ }
51
+
44
52
directive @someDirective(foo: String) on QUERY
45
53
` ) ;
46
54
} ) ;
@@ -61,6 +69,20 @@ describe('Validate: Unique argument definition names', () => {
61
69
): String
62
70
}
63
71
72
+ extend type SomeObject {
73
+ anotherField(
74
+ foo: String
75
+ bar: String
76
+ ): String
77
+ }
78
+
79
+ extend interface SomeInterface {
80
+ anotherField(
81
+ foo: String
82
+ bar: String
83
+ ): String
84
+ }
85
+
64
86
directive @someDirective(
65
87
foo: String
66
88
bar: String
@@ -86,6 +108,22 @@ describe('Validate: Unique argument definition names', () => {
86
108
): String
87
109
}
88
110
111
+ extend type SomeObject {
112
+ anotherField(
113
+ foo: String
114
+ bar: String
115
+ bar: String
116
+ ): String
117
+ }
118
+
119
+ extend interface SomeInterface {
120
+ anotherField(
121
+ bar: String
122
+ foo: String
123
+ foo: String
124
+ ): String
125
+ }
126
+
89
127
directive @someDirective(
90
128
foo: String
91
129
bar: String
@@ -108,11 +146,27 @@ describe('Validate: Unique argument definition names', () => {
108
146
{ line : 14 , column : 11 } ,
109
147
] ,
110
148
} ,
149
+ {
150
+ message :
151
+ 'Argument "SomeObject.anotherField(bar:)" can only be defined once.' ,
152
+ locations : [
153
+ { line : 21 , column : 11 } ,
154
+ { line : 22 , column : 11 } ,
155
+ ] ,
156
+ } ,
157
+ {
158
+ message :
159
+ 'Argument "SomeInterface.anotherField(foo:)" can only be defined once.' ,
160
+ locations : [
161
+ { line : 29 , column : 11 } ,
162
+ { line : 30 , column : 11 } ,
163
+ ] ,
164
+ } ,
111
165
{
112
166
message : 'Argument "@someDirective(foo:)" can only be defined once.' ,
113
167
locations : [
114
- { line : 19 , column : 9 } ,
115
- { line : 21 , column : 9 } ,
168
+ { line : 35 , column : 9 } ,
169
+ { line : 37 , column : 9 } ,
116
170
] ,
117
171
} ,
118
172
] ) ;
0 commit comments