prisma-datamodel
Advanced tools
Comparing version 1.36.0-alpha.6 to 1.36.0-alpha.7
@@ -22,3 +22,7 @@ "use strict"; | ||
function mapIdType(type) { | ||
return type === 'ID' ? 'String' : type; | ||
var map = { | ||
ID: 'String', | ||
UUID: 'String', | ||
}; | ||
return map[type] || type; | ||
} | ||
@@ -49,3 +53,5 @@ function getType(field) { | ||
dbName: type.databaseName, | ||
fields: type.fields.map(function (field) { | ||
fields: type.fields | ||
.filter(function (f) { return f.type !== 'Json'; }) | ||
.map(function (field) { | ||
var kind = getKind(field, enumMap); | ||
@@ -60,2 +66,9 @@ var defaultValue; | ||
} | ||
if (field.type === 'UUID') { | ||
defaultValue = { | ||
name: 'uuid', | ||
returnType: 'String', | ||
args: [], | ||
}; | ||
} | ||
if (field.isCreatedAt) { | ||
@@ -62,0 +75,0 @@ defaultValue = { |
{ | ||
"name": "prisma-datamodel", | ||
"version": "1.36.0-alpha.6", | ||
"version": "1.36.0-alpha.7", | ||
"description": "Transform prisma datamodel SDL into graphql-js SDL", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
216825
3579