Skip to content

Fix the polygon input execution test passing a single ring literal - #10351

Merged
glen-84 merged 1 commit into
mainfrom
gai/polygon-input-test-ring-literal
Sep 3, 2026
Merged

glen-84 merged 1 commit into
mainfrom
gai/polygon-input-test-ring-literal

Conversation

@glen-84

@glen-84 glen-84 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • The Execution_Tests query in GeoJsonPolygonInputTests passed coordinates as a single ring's positions, a two-level list, while GeoJSONPolygonInput.coordinates has been [[Position]], a list of rings, since Fixed Polygon and Multi Polygon #4394. Validation rejected the literal and the snapshot had pinned that error, which GeoJsonPolygonInputType is not parsed correctly #9795 reported as a parser bug.
  • The literal is now nested one level deeper and the snapshot holds the parsed polygon. The parser needed no change: the ParseLiteral_* tests in the same class already use the list-of-rings shape.

Test plan

  • HotChocolate.Types.Spatial.Tests passes on net10.0.

Closes #9795

Copilot AI lite review requested due to automatic review settings September 3, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The updated test input now correctly matches the [[Position]] (list-of-rings) schema contract and the snapshot change reflects the intended successful behavior.

Pull request overview

This PR corrects the GeoJsonPolygonInputTests.Execution_Tests GraphQL literal to match the GeoJSONPolygonInput.coordinates contract ([[Position]] = list of rings), resolving the previously snapshotted validation error and aligning the test with the behavior reported in #9795.

Changes:

  • Updated the coordinates argument in Execution_Tests to nest positions as a single ring within a list of rings.
  • Updated the corresponding snapshot to assert successful parsing/execution and the resulting polygon output.
File summaries
File Description
src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonInputTests.cs Fixes the test query literal to provide coordinates as a list of rings (correct input shape).
src/HotChocolate/Spatial/test/Types.Tests/snapshots/GeoJsonPolygonInputTests.Execution_Tests.snap Replaces the previously pinned validation error snapshot with the successful execution result snapshot.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@glen-84
glen-84 merged commit 5104188 into main Sep 3, 2026
294 of 296 checks passed
@glen-84
glen-84 deleted the gai/polygon-input-test-ring-literal branch September 3, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeoJsonPolygonInputType is not parsed correctly

2 participants