types_*
- flatten map of types
types_{type}_fieldType
- TypeScript type nametypes_{type}_fieldModule
- Module to importtypes_{type}_graphqlType
- GraphQL type nametypes_{type}_graphqlModule
- Module to import
Where {type}
is prisma type in schema
Example (Decimal):
types_Decimal_fieldType = "Decimal"
types_Decimal_fieldModule = "decimal.js"
types_Decimal_graphqlType = "GraphQLDecimal"
types_Decimal_graphqlModule = "graphql-type-decimal"
Generates field:
import { GraphQLDecimal } from 'graphql-type-decimal';
import { Decimal } from 'decimal.js';
...
@Field(() => GraphQLDecimal)
field: Decimal;
Example (DateTime):
types_DateTime_fieldType = "Date"
types_DateTime_graphqlType = "GraphQLISODateTime"
types_DateTime_graphqlModule = "@nestjs/graphql"
Generated fields:
@Field(() => GraphQLISODateTime)
field: Date;