org.opentripplanner.ext.legacygraphqlapi.datafetchers.LegacyGraphQLserviceTimeRangeImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.ext.legacygraphqlapi.datafetchers;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.opentripplanner.ext.legacygraphqlapi.LegacyGraphQLRequestContext;
import org.opentripplanner.ext.legacygraphqlapi.generated.LegacyGraphQLDataFetchers;
import org.opentripplanner.routing.RoutingService;
public class LegacyGraphQLserviceTimeRangeImpl implements LegacyGraphQLDataFetchers.LegacyGraphQLServiceTimeRange {
@Override
public DataFetcher start() {
return environment -> getRoutingService(environment).getTransitServiceStarts();
}
@Override
public DataFetcher end() {
return environment -> getRoutingService(environment).getTransitServiceEnds();
}
private RoutingService getRoutingService(DataFetchingEnvironment environment) {
return environment.getContext().getRoutingService();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy