Add refetch itinerary query to GTFS API#7749
Draft
m0rii wants to merge 1 commit into
Draft
Conversation
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.
Summary
This PR adds a
refetchItineraryquery to the GTFS GraphQL API. The new query exposes itinerary refetching through the GTFS API and returns the refreshed itinerary result using the existing GraphQL response model.Issue
This feature is needed so clients can refresh a previously selected itinerary through the GTFS GraphQL API instead of running a completely new trip search.
The implementation adds the new query to the GTFS GraphQL schema and wires it into the existing query data fetcher. The generated GraphQL API classes were updated accordingly. A small result wrapper was added for the refetched itinerary response, and the request mapping was adjusted so the refetch request can be created from the GraphQL input.
Invalid leg identifiers are handled as GraphQL data fetching errors.
Unit tests
Tests were added/updated for the new GTFS API refetch itinerary functionality.
The test coverage includes:
Manual verification was also done by executing the GraphQL query and checking the returned response structure.
Documentation
No new configuration options were added.
The implementation follows the existing GTFS GraphQL API structure. Non-trivial behavior is covered by tests and by the existing API/request mapping patterns.
Changelog
The PR title describes the added feature:
Add refetch itinerary query to GTFS APIBumping the serialization version id
This PR does not change the serialized routing graph format, so no serialization version bump is required.