@pegasusheavy/nestjs-prisma-graphql 1.3.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generate.js +5 -3
- package/dist/generate.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/generate.js
CHANGED
|
@@ -838,9 +838,11 @@ function inputType(args) {
|
|
|
838
838
|
}
|
|
839
839
|
if (propertySettings) {
|
|
840
840
|
importDeclarations.create({ ...propertySettings });
|
|
841
|
-
} else if (propertyType.some(
|
|
841
|
+
} else if (propertyType.some(
|
|
842
|
+
(p) => typeof p === "string" && p.includes("Prisma.Decimal")
|
|
843
|
+
)) {
|
|
842
844
|
importDeclarations.add("Prisma", config.prismaClientImport);
|
|
843
|
-
} else if (propertyType.some((p) => p.startsWith("Prisma."))) {
|
|
845
|
+
} else if (propertyType.some((p) => typeof p === "string" && p.startsWith("Prisma."))) {
|
|
844
846
|
importDeclarations.add("Prisma", config.prismaClientImport);
|
|
845
847
|
}
|
|
846
848
|
let graphqlType;
|
|
@@ -1532,7 +1534,7 @@ function modelOutputType(outputType2, args) {
|
|
|
1532
1534
|
if (graphqlImport.name !== outputType2.name && graphqlImport.specifier !== null && graphqlImport.specifier !== void 0 && graphqlImport.specifier.length > 0) {
|
|
1533
1535
|
const isCircular = config.esmCompatible && location === "outputObjectTypes" && namespace === "model" && hasCircularDependency(circularDependencies, outputType2.name, outputTypeName);
|
|
1534
1536
|
if (isCircular) {
|
|
1535
|
-
importDeclarations.
|
|
1537
|
+
importDeclarations.add(graphqlImport.name, graphqlImport.specifier);
|
|
1536
1538
|
lazyTypes.add(graphqlImport.name);
|
|
1537
1539
|
useGetType = true;
|
|
1538
1540
|
} else {
|