Skip to content

Commit 7c7c599

Browse files
fix(gtfs/util): Remove the hardcoded limit of 30 to make it work with GTFS_ROUTE_NOT_ADDED dropdown.
1 parent 9dee4be commit 7c7c599

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/gtfs/util/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {GTFS_GRAPHQL_PREFIX} from '../../common/constants'
66
import {getGtfsSpec} from '../../common/util/config'
77
import {routeSearch, stopSearch} from '../util/graphql'
88
import {getHeaders} from '../../common/util/util'
9-
109
import type {GtfsRoute, GtfsStop, User} from '../../types'
1110

1211
export function getEntityIdField (type: string): string {
@@ -229,6 +228,8 @@ export function searchEntitiesWithString (
229228
const includeStopSubQuery = !!filterByRoute
230229
// Build routes/stops query based on entities searching and whether we're
231230
// filtering by a specific route or stop ID.
231+
// FIXME: Removed the hardcoded limit of 30 on the route search so it works with the GTFS_ROUTE_NOT_ADDED field,
232+
// but does removing that negatively affect anything else?
232233
const body = JSON.stringify({
233234
query: `
234235
query (
@@ -239,7 +240,7 @@ query (
239240
) {
240241
feed(namespace: $namespace) {
241242
${queryForRoutes && includeRouteSubQuery ? stopSearch(true, 30) : ''}
242-
${queryForRoutes && !includeRouteSubQuery ? routeSearch(false, 30) : ''}
243+
${queryForRoutes && !includeRouteSubQuery ? routeSearch(false) : ''}
243244
${queryForStops && includeStopSubQuery ? routeSearch(true, 30) : ''}
244245
${queryForStops && !includeStopSubQuery ? stopSearch(false, 30) : ''}
245246
}

0 commit comments

Comments
 (0)