Skip to content

[core] Expose parking placeEquipments in GraphQL input and output - #426

Closed
teppope wants to merge 3 commits into
entur:masterfrom
tmfg:feat/parking-cycle-storage-graphql
Closed

teppope wants to merge 3 commits into
entur:masterfrom
tmfg:feat/parking-cycle-storage-graphql

Conversation

@teppope

@teppope teppope commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

Note for reviewers: This change is proposed as a core contribution because the storage implementation already exists (parking table has a place_equipments_id FK since the V1 schema, and PlaceEquipmentMapper already handles CycleStorageEquipment bidirectionally), the changes are minimal, and placeEquipments is standard NeTEx. Alternatively, it could be implemented as a Fintraffic parking extension via ParkingGraphQLTypeContributor — happy to take that route if preferred.

Summary

Adds placeEquipments to the Parking GraphQL output and input types, enabling cycle storage equipment (and other place equipment) to be read and written via mutateParking.

The storage layer already supports this: the parking table has a place_equipments_id FK, and PlaceEquipmentMapper handles CycleStorageEquipment bidirectionally. The PlaceEquipments GraphQL type already included cycleStorageEquipment. The only missing pieces were wiring the field into the parking-specific types and registering the data fetcher.

Type of change

  • New feature (non-breaking change which adds functionality)

Issue

Cycle storage equipment was persisted on Parking entities via NeTEx import but was not accessible via the GraphQL API. This is needed for the Fintraffic Liipi P&R migration to expose cycle storage (mapped from BICYCLE_FRAME_LOCK service flags) through the editor.

  • Adds placeEquipments field to createParkingObjectType (output)
  • Adds placeEquipments field to createParkingInputObjectType (input)
  • Adds Parking case to dataFetcherPlaceEquipments in StopPlaceRegisterGraphQLSchema
  • Registers the data fetcher for OUTPUT_TYPE_PARKING
  • Adds PlaceEquipmentMapper handling in ParkingUpdater.populateParking

Unit tests

Added testMutateParkingWithCycleStorageShouldPersistAndReturn in GraphQLResourceParkingIntegrationTest: creates a parking via mutateParking with placeEquipments.cycleStorageEquipment and asserts the type and number of spaces are returned in the response.

Documentation

N/A — fields are standard NeTEx, no additional documentation needed.

@teppope teppope changed the title Expose parking placeEquipments in GraphQL output and input types [core] Expose parking placeEquipments in GraphQL input and output Jul 28, 2026
@teppope
teppope marked this pull request as ready for review July 30, 2026 06:09
@teppope
teppope marked this pull request as draft July 30, 2026 06:39
@teppope
teppope marked this pull request as ready for review July 30, 2026 06:44
teppope and others added 3 commits September 3, 2026 14:40
…input types

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@teppope
teppope force-pushed the feat/parking-cycle-storage-graphql branch from 816baa4 to d0fbbd8 Compare September 3, 2026 11:55
@teppope

teppope commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Closing in favour of #465.

This fix has been folded into #465 unchanged (cherry-picked as commit 8b5109726, with paths rewritten for the new multi-module tiamat-core layout). It is one of the first three commits there, ahead of the parking feature commits, so it stays independently reviewable and revertable.

Consolidating was requested so that all parking changes land as a single PR. The trade-off is noted: this fix now merges with #465 rather than on its own — happy to re-extract it if you would prefer to merge it separately first.

@teppope teppope closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant