prisma-nestjs-graphql 14.6.1 → 14.7.1
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/README.md +32 -0
- package/index.js +542 -262
- package/package.json +40 -36
package/README.md
CHANGED
|
@@ -279,6 +279,38 @@ data!: UserCreateInput;
|
|
|
279
279
|
|
|
280
280
|
```
|
|
281
281
|
|
|
282
|
+
#### `graphqlScalars`
|
|
283
|
+
|
|
284
|
+
Allow to set custom graphql type for Prisma scalar type.
|
|
285
|
+
Format:
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
graphqlScalars_{type}_name = "string"
|
|
289
|
+
graphqlScalars_{type}_specifier = "string"
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
where `{type}` is a prisma scalar type name (e.g. BigInt)
|
|
293
|
+
|
|
294
|
+
Example:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
graphqlScalars_BigInt_name = "GraphQLBigInt"
|
|
298
|
+
graphqlScalars_BigInt_specifier = "graphql-scalars"
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
May generate:
|
|
302
|
+
|
|
303
|
+
```ts
|
|
304
|
+
import { GraphQLBigInt } from 'graphql-scalars';
|
|
305
|
+
|
|
306
|
+
export class BigIntFilter {
|
|
307
|
+
@Field(() => GraphQLBigInt, { nullable: true })
|
|
308
|
+
equals?: bigint | number;
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
It will affect all inputs and outputs types (including models).
|
|
313
|
+
|
|
282
314
|
## Field Settings
|
|
283
315
|
|
|
284
316
|
Special directives in triple slash comments for more precise code generation.
|