We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fcade6d + e552c65 commit b9b43b4Copy full SHA for b9b43b4
lib/generators/gql/gql_generator_base.rb
@@ -21,7 +21,8 @@ def type_map
21
datetime: 'GraphQL::Types::ISO8601DateTime',
22
date: 'GraphQL::Types::ISO8601Date',
23
hstore: 'GraphQL::Types::JSON',
24
- text: 'String'
+ text: 'String',
25
+ json: 'GraphQL::Types::JSON'
26
}
27
end
28
@@ -32,7 +33,8 @@ def map_model_types(model_name)
32
33
34
klass.columns
35
.reject { |col| bt_columns.include?(col.name) }
- .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]} }
38
39
40
0 commit comments