Skip to content

Commit 08f742d

Browse files
Merge pull request opentripplanner#6717 from leonardehrenfried/deprecate-clusters
Deprecate `clusters` and `Leg#intermediatePlace` in GTFS GraphQL API
2 parents c8c0d76 + 91caa03 commit 08f742d

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public DataFetcher<Boolean> interlineWithPreviousLeg() {
127127
return environment -> getSource(environment).isInterlinedWithPreviousLeg();
128128
}
129129

130-
// TODO
131130
@Override
131+
@Deprecated
132132
public DataFetcher<Boolean> intermediatePlace() {
133133
return environment -> false;
134134
}

application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,13 @@ public DataFetcher<Iterable<VehicleParking>> carParks() {
250250
}
251251

252252
@Override
253+
@Deprecated
253254
public DataFetcher<Object> cluster() {
254255
return environment -> null;
255256
}
256257

257258
@Override
259+
@Deprecated
258260
public DataFetcher<Iterable<Object>> clusters() {
259261
return environment -> Collections.EMPTY_LIST;
260262
}

application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/StopImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public DataFetcher<Iterable<TransitAlert>> alerts() {
126126
}
127127

128128
@Override
129+
@Deprecated
129130
public DataFetcher<Object> cluster() {
130131
return environment -> null;
131132
}

application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,17 @@ type CarPark implements Node & PlaceInterface {
376376
"Cluster is a list of stops grouped by name and proximity"
377377
type Cluster implements Node {
378378
"ID of the cluster"
379-
gtfsId: String!
379+
gtfsId: String! @deprecated(reason : "Not implemented")
380380
"Global object ID provided by Relay. This value can be used to refetch this object using **node** query."
381-
id: ID!
381+
id: ID! @deprecated(reason : "Not implemented")
382382
"Latitude of the center of this cluster (i.e. average latitude of stops in this cluster)"
383-
lat: Float!
383+
lat: Float! @deprecated(reason : "Not implemented")
384384
"Longitude of the center of this cluster (i.e. average longitude of stops in this cluster)"
385-
lon: Float!
385+
lon: Float! @deprecated(reason : "Not implemented")
386386
"Name of the cluster"
387-
name: String!
387+
name: String! @deprecated(reason : "Not implemented")
388388
"List of stops in the cluster"
389-
stops: [Stop!]
389+
stops: [Stop!] @deprecated(reason : "Not implemented")
390390
}
391391

392392
"Contact information for booking an on-demand or flexible service."
@@ -765,7 +765,7 @@ type Leg {
765765
"""
766766
interlineWithPreviousLeg: Boolean
767767
"Whether the destination of this leg (field `to`) is one of the intermediate places specified in the query."
768-
intermediatePlace: Boolean
768+
intermediatePlace: Boolean @deprecated(reason : "Not implemented")
769769
"""
770770
For transit legs, intermediate stops between the Place where the leg
771771
originates and the Place where the leg ends. For non-transit legs, null.
@@ -1275,9 +1275,9 @@ type QueryType {
12751275
ids: [String]
12761276
): [CarPark] @deprecated(reason : "carParks is deprecated. Use vehicleParkings instead.")
12771277
"Get a single cluster based on its ID, i.e. value of field `gtfsId`"
1278-
cluster(id: String!): Cluster
1278+
cluster(id: String!): Cluster @deprecated(reason : "Not implemented")
12791279
"Get all clusters"
1280-
clusters: [Cluster]
1280+
clusters: [Cluster] @deprecated(reason : "Not implemented")
12811281
"Get a single departure row based on its ID (ID format is `FeedId:StopId:PatternId`)"
12821282
departureRow(id: String!): DepartureRow
12831283
"Get all available feeds"
@@ -1456,7 +1456,7 @@ type QueryType {
14561456
"When true, real-time updates are ignored during this search. Default value: false"
14571457
ignoreRealtimeUpdates: Boolean,
14581458
"An ordered list of intermediate locations to be visited."
1459-
intermediatePlaces: [InputCoordinates] @deprecated(reason : "Not implemented in OTP2."),
1459+
intermediatePlaces: [InputCoordinates] @deprecated(reason : "Not implemented"),
14601460
"""
14611461
How easily bad itineraries are filtered from results. Value 0 (default)
14621462
disables filtering. Itineraries are filtered if they are worse than another
@@ -1575,7 +1575,7 @@ type QueryType {
15751575
travel time of the trip (and therefore arguments `time` and `from` must be
15761576
used correctly to get meaningful itineraries).
15771577
"""
1578-
startTransitTripId: String @deprecated(reason : "Not implemented in OTP2"),
1578+
startTransitTripId: String @deprecated(reason : "Not implemented"),
15791579
"Time of departure or arrival in format hh:mm:ss. Default value: current time"
15801580
time: String,
15811581
"""
@@ -2121,7 +2121,7 @@ type Stop implements Node & PlaceInterface {
21212121
types: [StopAlertType]
21222122
): [Alert]
21232123
"The cluster which this stop is part of"
2124-
cluster: Cluster
2124+
cluster: Cluster @deprecated(reason : "Not implemented")
21252125
"Stop code which is visible at the stop"
21262126
code: String
21272127
"Description of the stop, usually a street name"
@@ -4095,14 +4095,14 @@ input InputBanned {
40954095
banned for boarding and disembarking vehicles — it is possible to get an
40964096
itinerary where a vehicle stops at one of these stops
40974097
"""
4098-
stops: String @deprecated(reason : "Not implemented in OTP2.")
4098+
stops: String @deprecated(reason : "Not implemented")
40994099
"""
41004100
A comma-separated list of banned stop ids. Only itineraries where these stops
41014101
are not travelled through are returned, e.g. if a bus route stops at one of
41024102
these stops, that route will not be used in the itinerary, even if the stop is
41034103
not used for boarding or disembarking the vehicle.
41044104
"""
4105-
stopsHard: String @deprecated(reason : "Not implemented in OTP2.")
4105+
stopsHard: String @deprecated(reason : "Not implemented")
41064106
"A comma-separated list of banned trip ids"
41074107
trips: String
41084108
}

0 commit comments

Comments
 (0)