Releases: paljs/prisma-tools
v1.2.3
v1.2.0
generator
-
update
orderBy
arg to accept an array of the objects so you can use sort by multi fields.
this feature included in Prisma version2.4.1
-
update
aggregate
query and add where, orderBy, cursor, skip, take args to filter your query
v1.1.11
Admin
Add new 4 functions as props in PrismaTable component to be able to custom actions after save
cancel
in create and update forms
onCancelCreate?: (options: {
model: string;
setCreateModal: (state: boolean) => void;
}) => void;
onSaveCreate?: (options: {
model: string;
setCreateModal: (state: boolean) => void;
refetchTable: (options: any) => void;
}) => void;
onCancelUpdate?: (options: { model: string }) => void;
onSaveUpdate?: (options: {
model: string;
refetchTable: (options?: any) => void;
}) => void;
v1.1.7
plugins
Fix a bug in PrismaDelete
plugin
v1.1.6
admin
- Export
TableContext
to use inside custom table columns or form inputs - add
getValues
andwatch
functions to form input components props
v1.1.3
PrismaDelete
Breaking change
PrismaSelect class now accept just one arg Prisma client class Full Docs
Now you need to update your schema.prisma
file and change //
to ///
like the example
model User {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
email String @unique
name String?
password String
/// @onDelete(CASCADE)
posts Post[]
group Group? @relation(fields: [groupId], references: [id])
groupId Int?
/// @onDelete(SET_NULL)
comments Comment[]
}
Admin
now we adding models without @id
but you can't use an update and delete actions
v1.1.1
generator
Add aggregate
to the auto-generated CRUD system.
plugins
PrismaSelect
Support new return type AggregateX
X your model name
convert
{
aggregateUser{
count
min{
id
}
max{
id
}
avg{
id
}
sum {
id
}
}
}
To be
const select = {
count: true,
min: { id: true },
max: { id: true },
avg: { id: true },
sum: { id: true }
}
And you can pass it to your API like that
resolve(_parent, _args, { prisma, select }) {
return prisma.user.aggregate(select)
},
nexus
nexus plugin now adding AggregateX
types to your nexus schema so you can use them
v1.0.6
update generator to work with prisma v2.2.0
v1.0.3
Fix issue in examples @paljs/icons
was has the wrong version
v1.0.2
New features:
admin
:
- add
upload
option into fields settings to use theUpload
component in the update and create You must send this component intoformInputs
prop because we do not have any default one for this option. - add
onSelect
props to add a checkbox for every record on the table you can use for custom cases like delete many
Fix issue in examples