New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prisma-nestjs-graphql

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-nestjs-graphql - npm Package Compare versions

Comparing version 14.2.2 to 14.3.0

20

index.js

@@ -1281,2 +1281,20 @@ var __create = Object.create;

// src/handlers/require-single-fields-in-whereunique-input.ts
function requireSingleFieldsInWhereUniqueInput(eventEmitter) {
eventEmitter.on("BeforeInputType", beforeInputType3);
}
function beforeInputType3(args) {
const { inputType: inputType2 } = args;
if (!isWhereUniqueInputType(inputType2.name) || inputType2.fields.length !== 1) {
return;
}
for (const field of inputType2.fields) {
field.isRequired = true;
field.isNullable = false;
}
}
function isWhereUniqueInputType(name) {
return name.endsWith("WhereUniqueInput");
}
// src/handlers/warning.ts

@@ -1358,2 +1376,3 @@ function warning(message) {

noTypeId: toBoolean(config.noTypeId),
requireSingleFieldsInWhereUniqueInput: toBoolean(config.requireSingleFieldsInWhereUniqueInput),
decorate

@@ -1588,2 +1607,3 @@ };

config.purgeOutput && purgeOutput(eventEmitter);
config.requireSingleFieldsInWhereUniqueInput && requireSingleFieldsInWhereUniqueInput(eventEmitter);
const models = new Map();

@@ -1590,0 +1610,0 @@ const modelNames = [];

2

package.json
{
"name": "prisma-nestjs-graphql",
"version": "14.2.2",
"version": "14.3.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Generate object types, inputs, args, etc. from prisma schema file for usage with @nestjs/graphql module",

@@ -129,2 +129,9 @@ # prisma-nestjs-graphql

#### `requireSingleFieldsInWhereUniqueInput`
When a `Model`s `WhereUniqueInput` class has only a single field, mark that field as **required** (TypeScript) and **not nullable** (GraphQL).
See [#58](https://github.com/unlight/prisma-nestjs-graphql/issues/58) for more details.
Type: `boolean`
Default: `false`
#### `useInputType`

@@ -131,0 +138,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc