Releases: paljs/prisma-tools
v2.2.1
CLI
Fix issue when trying to generate a custom type like admin
or graphql
it generated all crud in the backend.
Admin
use dompurify
package to secure the input
v2.2.0
breaking changes
- delete
schemaFolder
option frompal.js
and now we use the same way of prisma CLI
pal g --schema=./alternative/schema.prisma
- delete
prismaClientPath
option because now we usegetDMMF
from@prisma/sdk
package and all we need nowschemaPath
Generator Class
If you use our Generator class his args had changed
old
import { Generator } from '@paljs/generator';
new Generator('nexus', {}).run();
new
import { Generator } from '@paljs/generator';
new Generator({name: 'nexus', schemaPath: './prisma/schema.prisma'}, {}).run();
v2.1.0
drop supporting Nexus Framework
breaking change
change generator name from nexus-schema
to be nexus
v2.0.2
Schema camel case
converter
- Skip converting relations fields name.
- Skip converting the names of the enum.
v2.0.1
v2.0.0
v1.6.0
Prisma dmmf
object changed in version 2.8.0
so this release to work with the last version of prisma.
This version requires Prisma 2.8.0
v1.5.6
V1.5.5
PrismaSelect
For fix #131 issue we added new method valueWithFilter
.
Work with this method if your GraphQL type name not like Schema model name.
// normal call
const select = new PrismaSelect(info).value
// With filter will filter select object with provided schema model name
const select = new PrismaSelect(info).valueWithFilter('User');
v1.5.0
Prisma Admin
Support list fields in our create and Update forms
you will add them in the input as a string with ,
between every value
Int[]
=>1,2,3,4
converted to[1,2,3,4]
Flout[]
=>1.2,2.3,3.5
converted to[1.2,2.3,3.5 ]
String[]
=>first,second
converted to['first','second']
enum[]
=>USER,ADMIN
converted to['USER','ADMIN']
Json[]
=>[{"first": 1},{"second": 2}]
we will pass value throughtJSON.parse()
PrismaSelect
added new arg to the prismaSelect class to add default fields object
if you want to add some fields to fetch event user not request in in graphql query
const defaultFields = {
User: { id: true, name: true },
Type: { id: true, descriptionRaw: true },
Post: { id: true, body: true },
}
const prismaSelect = new PrismaSelect(info, defaultFields);