Releases: paljs/prisma-tools
v2.5.12
plugins
resolve #152
adding a new option to onDelete
method to custom what fields you want to return
prismaDelete.onDelete({
model: 'User',
where: { id: 1 },
deleteParent: true, // if true will also delete user record default false
// new option
returnFields: {id: true, name: true} // you can select what you need to return from parent record
});
v2.5.7
v2.5.2
v2.5.1
PrismaSelect
Fix issue in forget add @paljs/display
package to dependencies
PrismaDelete
Add new arg to constructor
to accept options
You can now send the custom client
import {PrismaClient, dmmf} from './generate/client';
const prisma = new PrismaClient();
const prismaDelete = new PrismaDelete(prisma, { dmmf });
v2.5.0
PrismaSelect
breaking changes
In this release, we changed the second arg in the PrismaSelect
class and removed the third arg.
was
const select = new PrismaSelect(info, defaultFields, mergeObject)
now
const select = new PrismaSelect(info, { defaultFields })
New feature
Now you can send a new option to custom your Prisma client generation
import { dmmf } from './generate/client';
const select = new PrismaSelect(info, { dmmf })
v2.4.0
v2.3.2
Generator
SDL First
Adding custom type for custom resolvers names
v2.3.0
Generator
findFirst
Adding new findFirst
query that Prisma added in their 2.8.0 version
SDL First
Now we generate all resolvers types to support full resolver typing
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();