Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -457,20 +457,13 @@ private GraphQLSchema create() {
.build()
)
.dataFetcher(env -> {
if (env.getArgument("ids") != null) {
var ids = mapIDsToDomainNullSafe(env.getArgument("ids"));
return ids
.stream()
.map(id -> StopPlaceType.fetchStopPlaceById(id, env))
.collect(Collectors.toList());
if (env.getArgument("ids") == null) {
throw new IllegalArgumentException("ids argument must be set to a non-null value.");
}
TransitService transitService = GqlUtil.getTransitService(env);
return transitService
.listStations()
var ids = mapIDsToDomainNullSafe(env.getArgument("ids"));
return ids
.stream()
.map(station ->
new MonoOrMultiModalStation(station, transitService.findMultiModalStation(station))
)
.map(id -> StopPlaceType.fetchStopPlaceById(id, env))
.collect(Collectors.toList());
})
.build()
Expand Down
Loading