From 1f281b5cc103220c8576cf735ece229d9b24b26e Mon Sep 17 00:00:00 2001 From: Glen Date: Thu, 3 Sep 2026 17:38:23 +0200 Subject: [PATCH] Fix the polygon input execution test passing a single ring literal --- .../Types.Tests/GeoJsonPolygonInputTests.cs | 2 +- ...JsonPolygonInputTests.Execution_Tests.snap | 23 +++---------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonInputTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonInputTests.cs index 6b0faabcf9a..851a6fae131 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonInputTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonInputTests.cs @@ -180,7 +180,7 @@ public async Task Execution_Tests() // act var result = await executor.ExecuteAsync( - "{ test(arg: { type: Polygon, coordinates:[[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]] })}", + "{ test(arg: { type: Polygon, coordinates: [[[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]] })}", TestContext.Current.CancellationToken); // assert diff --git a/src/HotChocolate/Spatial/test/Types.Tests/__snapshots__/GeoJsonPolygonInputTests.Execution_Tests.snap b/src/HotChocolate/Spatial/test/Types.Tests/__snapshots__/GeoJsonPolygonInputTests.Execution_Tests.snap index 70f26b19035..028f6f108ba 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/__snapshots__/GeoJsonPolygonInputTests.Execution_Tests.snap +++ b/src/HotChocolate/Spatial/test/Types.Tests/__snapshots__/GeoJsonPolygonInputTests.Execution_Tests.snap @@ -1,22 +1,5 @@ { - "errors": [ - { - "message": "The specified value type of field `coordinates` does not match the field type.", - "locations": [ - { - "line": 1, - "column": 42 - } - ], - "path": [ - "test" - ], - "extensions": { - "fieldName": "coordinates", - "fieldType": "[[Position]]", - "locationType": "[[Position]]", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Values-of-Correct-Type" - } - } - ] + "data": { + "test": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))" + } }