Skip to content

Commit 6b9b52a

Browse files
committed
fix(editor): fetch only required fields for feed info
1 parent d6d0dcd commit 6b9b52a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/gtfs/util/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ export function getGraphQLFieldsForEntity (type: string, editor: boolean = false
4444
if (table) {
4545
fields = table.fields
4646
// Only filter required fields if not fetching for editor
47-
// FIXME: Check that ALL missing datatools fields are in GraphQL schema
48-
.filter(field => editor ? field : field.required && !field.datatools)
47+
// FIXME: This fetches only the required fields for feed info because there
48+
// are missing fields in the GraphQL schema and database (default color and
49+
// default route type).
50+
.filter(field => type === 'feedinfo' ? !field.datatools : editor ? field : field.required && !field.datatools)
4951
.map(field => field.name)
5052
.join('\n')
5153
// stop_times are a special case because they must be requested as a

0 commit comments

Comments
 (0)