Repository navigation
Make estimated calls non nullable in the TransModel API - #6526
Merged
t2gran merged 1 commit intoMar 14, 2025
Merged
Conversation
vpaturet
marked this pull request as ready for review
March 11, 2025 08:09
vpaturet
force-pushed
the
make_estimated_calls_non_null
branch
from
March 11, 2025 08:12
06e3f76 to
92b3bfa
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6526 +/- ##
=============================================
+ Coverage 70.17% 70.18% +0.01%
- Complexity 18310 18316 +6
=============================================
Files 2082 2082
Lines 77217 77217
Branches 7832 7832
=============================================
+ Hits 54185 54193 +8
+ Misses 20259 20256 -3
+ Partials 2773 2768 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
habrahamsson-skanetrafiken
approved these changes
Mar 11, 2025
habrahamsson-skanetrafiken
left a comment
Contributor
There was a problem hiding this comment.
I think it makes sense to disallow null in these cases, and use empty list as the default value.
t2gran
approved these changes
Mar 14, 2025
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
As a consequence of #6245, the TransModel API can return
nullfor the list ofestimatedCallsof a givenServiceJourneyorDatedServiceJourney, if the trip does not run on the given date. Before this change, the API would return an empty list[].This is not consistent with the rest of the API: On
quaysandstopPlaces,estimatedCallsare expected to be non-null. The same applies forserviceJourneyEstimatedCallsandintermediateEstimatedCallsin other parts of the API.This PR:
estimatedCallsonServiceJourneyandDatedServiceJourneywith the rest of the API, by making them explicitly non-nullable:[EstimatedCall!]!Note: while making a nullable input type non-nullable is a breaking change, making a nullable output type non-nullable does not break compatibility for API clients.
Issue
No.
Unit tests
No. The change is made in the GraphQL layer where we have little support for unit testing.
Documentation
No