diff --git a/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 95984ba6dd0..266574f546b 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -370,7 +370,7 @@ public DataFetcher leg() { return environment -> { TransitService transitService = getTransitService(environment); var args = new GraphQLTypes.GraphQLQueryTypeLegArgs(environment.getArguments()); - String id = args.getGraphQLId(); + String id = args.getGraphQLId().getId(); LegReference ref = LegReferenceSerializer.decode(id); if (ref == null) { return null; diff --git a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 3cd98b15652..d0ab004e654 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -2434,19 +2434,19 @@ public void setGraphQLTime(Integer time) { public static class GraphQLQueryTypeLegArgs { - private String id; + private graphql.relay.Relay.ResolvedGlobalId id; public GraphQLQueryTypeLegArgs(Map args) { if (args != null) { - this.id = (String) args.get("id"); + this.id = (graphql.relay.Relay.ResolvedGlobalId) args.get("id"); } } - public String getGraphQLId() { + public graphql.relay.Relay.ResolvedGlobalId getGraphQLId() { return this.id; } - public void setGraphQLId(String id) { + public void setGraphQLId(graphql.relay.Relay.ResolvedGlobalId id) { this.id = id; } } diff --git a/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index af0fd5dd6be..561ec9e38cc 100644 --- a/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1172,7 +1172,7 @@ type QueryType { time: Int! ): Trip "Try refetching the current state of a transit leg using its ID" - leg(id: String!): Leg + leg(id: ID!): Leg """ Get all places (stops, stations, etc. with coordinates) within the specified radius from a location. The returned type is a Relay connection (see