Skip to content

Commit

Permalink
Corrected GraphQL type for Array and Object to GraphQL String type.
Browse files Browse the repository at this point in the history
Because we'll use JSON string to store them.
  • Loading branch information
n2iw committed Apr 19, 2021
1 parent 5cdcdb0 commit 1e1557e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model-converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def write_to_output(args, schema):
prop_type = propType[PROP_TYPE]
if prop_type == 'DateTime' or prop_type == 'Date':
prop_type = 'String'
if prop_type == 'Object' or prop_type == 'Array':
prop_type = 'String'
prop_line = ' {}: {}'.format(prop, prop_type)
print(prop_line, file=graphql_file)
type_end = '}\n'
Expand Down

0 comments on commit 1e1557e

Please sign in to comment.