graphql-perl / GraphQL-Plugin-Convert-DBIC

Plugin to convert DBIx::Class schema to GraphQL schema
https://metacpan.org/release/GraphQL-Plugin-Convert-DBIC
4 stars 5 forks source link

'file' unknown data type: bytea #25

Open KES777 opened 1 year ago

KES777 commented 1 year ago

Hello. Thanks for such good module.

Please add bytea type.

--- a/DBIC.pm
+++ b/DBIC.pm
@@ -46,6 +46,7 @@ my %GRAPHQL_TYPE2SQLS = (
     # pgsql
     'cidr',
     'inet',
+    'bytea',
   ],
   Int => [
     'bigint',
KES777 commented 1 year ago

Also timestamptz and json are not known:

--- a/DBIC.pm
+++ b/DBIC.pm
@@ -46,6 +46,8 @@ my %GRAPHQL_TYPE2SQLS = (
     # pgsql
     'cidr',
     'inet',
+    'bytea',
+    'json',
   ],
   Int => [
     'bigint',
@@ -89,6 +91,7 @@ my %GRAPHQL_TYPE2SQLS = (
     'type_time_with_timezone',
     'type_timestamp_with_timezone',
     # pgsql
+    'timestamptz',
     'timestamp with time zone',
     'timestamp without time zone',
   ],
@@ -118,6 +121,7 @@ my %TYPEMAP = (