Repository navigation
Add GraphQL query support for the geopolyline field type - #1157
Open
danielerne wants to merge 3 commits into
Open
danielerne wants to merge 3 commits into
danielerne wants to merge 3 commits into
Conversation
Geopolyline has been a core Pimcore object field type since 2019, but DataHub never added a query resolver for it (unlike geopoint, geobounds and geopolygon, which it does support). A geopolyline is stored the same way as a geopolygon - an ordered array of GeoCoordinates - so this mirrors the existing Geopolygon query field config generator exactly, just registered under the geopolyline field type. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
pimcore-deployments
marked this pull request as draft
September 18, 2026 09:04
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
danielerne
marked this pull request as ready for review
September 18, 2026 09:08
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The duplicate generator should be consolidated, with strict typing and regression coverage addressed.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds DataHub GraphQL query support for Pimcore’s existing geopolyline field type.
Changes:
- Registers a geopolyline query type generator.
- Exposes polylines as lists of geographic points.
- Documents geopolyline query support.
File summaries
| File | Description |
|---|---|
| src/Resources/config/graphql.yml | Registers the geopolyline generator. |
| src/GraphQL/DataObjectQueryFieldConfigGenerator/Geopolyline.php | Defines the GraphQL field configuration. |
| doc/10_GraphQL/04_Query/05_DataObject_Queries.md | Lists geopolyline as supported. |
Review details
- Files reviewed: 11/26 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
pimcore-deployments
marked this pull request as draft
September 18, 2026 09:08
danielerne
marked this pull request as ready for review
September 18, 2026 09:25
pimcore-deployments
marked this pull request as draft
September 18, 2026 09:26
danielerne
marked this pull request as ready for review
September 18, 2026 09:26
pimcore-deployments
marked this pull request as draft
September 18, 2026 09:26
danielerne
marked this pull request as ready for review
September 18, 2026 09:29
A geopolyline is stored identically to a geopolygon (an ordered array of GeoCoordinates), so rather than duplicating the query field config generator class, tag the existing Geopolygon service for both field types - the same pattern already used for e.g. the Input generator (externalImage/input/rgbaColor/time all share one class). Also adds a focused test exercising the real DI compiler pass (ImportExportLocatorsPass) to confirm the geopolyline tag actually resolves to Geopolygon through the compiled service locator, and that the generator produces a list of GeopointType - container compilation alone would not catch a typo'd tag id or a wrong field type. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extract the repeated tag name and IDs into named constants so the addTag() calls fit within the 120-character line limit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
danielerne
force-pushed
the
feat/geopolyline-query-support
branch
from
September 18, 2026 09:31
9e6cf25 to
e4a50df
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes pimcore/platform-version#499
Summary
geopolylinehas been a core Pimcore object field type since 2019 (Pimcore\Model\DataObject\ClassDefinition\Data\Geopolyline), but DataHub never added a GraphQL query resolver for it -geopoint,geoboundsandgeopolygonare all supported,geopolylinewas simply missed.GeoCoordinates), so rather than adding a duplicate generator class, the existingGeopolygonquery field config generator is now tagged for bothgeopolygonandgeopolyline- the same pattern DataHub already uses for itsInputgenerator (tagged forexternalImage/input/rgbaColor/timeat once).geopolylinealongside the other geo types.tests/GraphQL/DataObjectQueryFieldConfigGenerator/GeopolylineTest.php) that exercises the realImportExportLocatorsPasscompiler pass and asserts thegeopolylinetag resolves toGeopolygonthrough the compiled service locator, and that the generator produces a list ofGeopointType- container compilation alone wouldn't catch a typo'd tagid:or a wrong field type.Test plan
php -lon all changed/added filesbin/console debug:container(taggedpimcore.datahub.graphql.dataobjectquerytypegenerator, autowired, picked up by the same service locator as the other geo type generators)🤖 Generated with Claude Code