Skip to content

Commit

Permalink
fix(editor): fetch only required fields for feed info
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Feb 22, 2018
1 parent d6d0dcd commit 6b9b52a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/gtfs/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ export function getGraphQLFieldsForEntity (type: string, editor: boolean = false
if (table) {
fields = table.fields
// Only filter required fields if not fetching for editor
// FIXME: Check that ALL missing datatools fields are in GraphQL schema
.filter(field => editor ? field : field.required && !field.datatools)
// FIXME: This fetches only the required fields for feed info because there
// are missing fields in the GraphQL schema and database (default color and
// default route type).
.filter(field => type === 'feedinfo' ? !field.datatools : editor ? field : field.required && !field.datatools)
.map(field => field.name)
.join('\n')
// stop_times are a special case because they must be requested as a
Expand Down

0 comments on commit 6b9b52a

Please sign in to comment.