@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/index.js
CHANGED
|
@@ -840,9 +840,11 @@ function inputType(args) {
|
|
|
840
840
|
}
|
|
841
841
|
if (propertySettings) {
|
|
842
842
|
importDeclarations.create({ ...propertySettings });
|
|
843
|
-
} else if (propertyType.some(
|
|
843
|
+
} else if (propertyType.some(
|
|
844
|
+
(p) => typeof p === "string" && p.includes("Prisma.Decimal")
|
|
845
|
+
)) {
|
|
844
846
|
importDeclarations.add("Prisma", config.prismaClientImport);
|
|
845
|
-
} else if (propertyType.some((p) => p.startsWith("Prisma."))) {
|
|
847
|
+
} else if (propertyType.some((p) => typeof p === "string" && p.startsWith("Prisma."))) {
|
|
846
848
|
importDeclarations.add("Prisma", config.prismaClientImport);
|
|
847
849
|
}
|
|
848
850
|
let graphqlType;
|
|
@@ -1534,7 +1536,7 @@ function modelOutputType(outputType2, args) {
|
|
|
1534
1536
|
if (graphqlImport.name !== outputType2.name && graphqlImport.specifier !== null && graphqlImport.specifier !== void 0 && graphqlImport.specifier.length > 0) {
|
|
1535
1537
|
const isCircular = config.esmCompatible && location === "outputObjectTypes" && namespace === "model" && hasCircularDependency(circularDependencies, outputType2.name, outputTypeName);
|
|
1536
1538
|
if (isCircular) {
|
|
1537
|
-
importDeclarations.
|
|
1539
|
+
importDeclarations.add(graphqlImport.name, graphqlImport.specifier);
|
|
1538
1540
|
lazyTypes.add(graphqlImport.name);
|
|
1539
1541
|
useGetType = true;
|
|
1540
1542
|
} else {
|