Skip to content

Commit b9b43b4

Browse files
committed
Merge branch 'master' into cud-mutations
2 parents fcade6d + e552c65 commit b9b43b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/generators/gql/gql_generator_base.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def type_map
2121
datetime: 'GraphQL::Types::ISO8601DateTime',
2222
date: 'GraphQL::Types::ISO8601Date',
2323
hstore: 'GraphQL::Types::JSON',
24-
text: 'String'
24+
text: 'String',
25+
json: 'GraphQL::Types::JSON'
2526
}
2627
end
2728

@@ -32,7 +33,8 @@ def map_model_types(model_name)
3233

3334
klass.columns
3435
.reject { |col| bt_columns.include?(col.name) }
35-
.map { |col| {name: col.name, gql_type: type_map.fetch(col.type)} }
36+
.reject { |col| type_map[col.type].nil? }
37+
.map { |col| {name: col.name, gql_type: type_map[col.type]} }
3638
end
3739
end
3840
end

0 commit comments

Comments
 (0)