Skip to content

Releases: paljs/prisma-tools

v1.2.3

20 Aug 17:51
Compare
Choose a tag to compare

admin

You can now connect or disconnect to list relations in the edit page

image

v1.2.0

20 Aug 17:48
Compare
Choose a tag to compare

generator

  • update orderBy arg to accept an array of the objects so you can use sort by multi fields.
    this feature included in Prisma version 2.4.1

  • update aggregate query and add where, orderBy, cursor, skip, take args to filter your query

v1.1.11

28 Jul 00:38
Compare
Choose a tag to compare

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

17 Jul 14:36
Compare
Choose a tag to compare

plugins

Fix a bug in PrismaDelete plugin

v1.1.6

17 Jul 14:35
Compare
Choose a tag to compare

admin

  • Export TableContext to use inside custom table columns or form inputs
  • add getValues and watch functions to form input components props

v1.1.3

13 Jul 16:42
Compare
Choose a tag to compare

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

10 Jul 12:53
Compare
Choose a tag to compare

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

09 Jul 18:27
Compare
Choose a tag to compare

update generator to work with prisma v2.2.0

v1.0.3

08 Jul 23:49
Compare
Choose a tag to compare

Fix issue in examples @paljs/icons was has the wrong version

v1.0.2

04 Jul 14:55
Compare
Choose a tag to compare

New features:
admin:

  • add upload option into fields settings to use the Upload component in the update and create You must send this component into formInputs 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