|
33 | 33 | * but these changes to `graphql-js` haven't been reflected in `graphql-php` yet.
|
34 | 34 | * TODO align with:
|
35 | 35 | * - https://github.com/graphql/graphql-js/commit/c1745228b2ae5ec89b8de36ea766d544607e21ea
|
36 |
| - * - https://github.com/graphql/graphql-js/commit/257797a0ebdddd3da6e75b7c237fdc12a1a7c75a |
37 | 36 | * - https://github.com/graphql/graphql-js/commit/3b9ea61f2348215dee755f779caef83df749d2bb
|
38 | 37 | * - https://github.com/graphql/graphql-js/commit/e6a3f08cc92594f68a6e61d3d4b46a6d279f845e
|
39 | 38 | * - https://github.com/graphql/graphql-js/commit/9b7a8af43fc0865a01df5b5a084f37bbb8680ef8
|
@@ -272,84 +271,6 @@ public function testDoesNotAllowReplacingAnExistingField(): void
|
272 | 271 | }
|
273 | 272 | }
|
274 | 273 |
|
275 |
| - // Extract check for unique type names into separate rule |
276 |
| - |
277 |
| - /** |
278 |
| - * @see it('does not allow replacing an existing type') |
279 |
| - */ |
280 |
| - public function testDoesNotAllowReplacingAnExistingType(): void |
281 |
| - { |
282 |
| - $existingTypeError = static function ($type): string { |
283 |
| - return 'Type "' . $type . '" already exists in the schema. It cannot also be defined in this type definition.'; |
284 |
| - }; |
285 |
| - |
286 |
| - $typeSDL = ' |
287 |
| - type Bar |
288 |
| - '; |
289 |
| - |
290 |
| - try { |
291 |
| - $this->extendTestSchema($typeSDL); |
292 |
| - self::fail(); |
293 |
| - } catch (Error $error) { |
294 |
| - self::assertEquals($existingTypeError('Bar'), $error->getMessage()); |
295 |
| - } |
296 |
| - |
297 |
| - $scalarSDL = ' |
298 |
| - scalar SomeScalar |
299 |
| - '; |
300 |
| - |
301 |
| - try { |
302 |
| - $this->extendTestSchema($scalarSDL); |
303 |
| - self::fail(); |
304 |
| - } catch (Error $error) { |
305 |
| - self::assertEquals($existingTypeError('SomeScalar'), $error->getMessage()); |
306 |
| - } |
307 |
| - |
308 |
| - $interfaceSDL = ' |
309 |
| - interface SomeInterface |
310 |
| - '; |
311 |
| - |
312 |
| - try { |
313 |
| - $this->extendTestSchema($interfaceSDL); |
314 |
| - self::fail(); |
315 |
| - } catch (Error $error) { |
316 |
| - self::assertEquals($existingTypeError('SomeInterface'), $error->getMessage()); |
317 |
| - } |
318 |
| - |
319 |
| - $enumSDL = ' |
320 |
| - enum SomeEnum |
321 |
| - '; |
322 |
| - |
323 |
| - try { |
324 |
| - $this->extendTestSchema($enumSDL); |
325 |
| - self::fail(); |
326 |
| - } catch (Error $error) { |
327 |
| - self::assertEquals($existingTypeError('SomeEnum'), $error->getMessage()); |
328 |
| - } |
329 |
| - |
330 |
| - $unionSDL = ' |
331 |
| - union SomeUnion |
332 |
| - '; |
333 |
| - |
334 |
| - try { |
335 |
| - $this->extendTestSchema($unionSDL); |
336 |
| - self::fail(); |
337 |
| - } catch (Error $error) { |
338 |
| - self::assertEquals($existingTypeError('SomeUnion'), $error->getMessage()); |
339 |
| - } |
340 |
| - |
341 |
| - $inputSDL = ' |
342 |
| - input SomeInput |
343 |
| - '; |
344 |
| - |
345 |
| - try { |
346 |
| - $this->extendTestSchema($inputSDL); |
347 |
| - self::fail(); |
348 |
| - } catch (Error $error) { |
349 |
| - self::assertEquals($existingTypeError('SomeInput'), $error->getMessage()); |
350 |
| - } |
351 |
| - } |
352 |
| - |
353 | 274 | // Validation: add support of SDL to KnownTypeNames
|
354 | 275 |
|
355 | 276 | /**
|
|
0 commit comments