Add new path for GTFS GraphQL API, remove batch feature#5581
Conversation
8246ad7 to
27e619b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5581 +/- ##
==========================================
Coverage 67.49% 67.49%
- Complexity 16226 16240 +14
==========================================
Files 1868 1874 +6
Lines 71297 71367 +70
Branches 7408 7398 -10
==========================================
+ Hits 48121 48170 +49
- Misses 20681 20700 +19
- Partials 2495 2497 +2 ☔ View full report in Codecov by Sentry. |
|
I think we should use |
I'm fine with all of this and have applied the feedback to this PR. |
32fb259 to
a407570
Compare
optionsome
left a comment
There was a problem hiding this comment.
There is still a reference in the magidoc.mjs to the old endpoint
|
|
||
| @Path("/routers/{ignoreRouterId}/index/graphql") | ||
| @Produces(MediaType.APPLICATION_JSON) | ||
| public class BackwardsCompatGraphQLAPI extends BaseGtfsGraphQLAPI { |
There was a problem hiding this comment.
Consider: I am not too happy about using inheritance for this, but I do get why you do it. A little less painful approach would be to let the old BackwardsCompatGraphQLAPI inherit the new GtfsGraphQLAPI - that allows us to use inheritance if we want in the new class (if there is a good reason to do it). Not sure if the @Path annotation clashes if you do so.
There was a problem hiding this comment.
This little trick worked - using a static inerclass to express the tight coupling ...
entur@3968a37
There was a problem hiding this comment.
By the way the url for the transmodel api should be /transmodel/v3. v1 and v2 exist in entur repo.
5b1daa5 to
f1ccf01
Compare
f1ccf01 to
216bea8
Compare
|
Thanks for the tip, @t2gran. I updated the code to use an inner class. However, I couldn't use the same one on the Transmodel API, since it has @PathParam annotations on both the class and the method level. This would mean that the new Transmodel API endpoint would be |
Summary
Changes the official path of the GTFS GraphQL API to
otp/gtfs/v1and keeps the old one around for backwards-compatibility. We can remove the backwards-compat when all known users have migrated their systems off it, which I expect to take quite a long time.It also removes the batch functionality which is confusing, unintuitive and in the age of HTTP2 doesn't have performance benefits.
Issue
#4052
Documentation
Updated.
cc @hbruch @vesameskanen @binh-dam-ibigroup @miles-grant-ibigroup
@t2gran: We agreed to remove tech from url, so I updated the summary - original suggestion was:
otp/graphql/gtfs/v1.