Skip to content

Releases: paljs/prisma-tools

v2.2.1

05 Oct 13:07
Compare
Choose a tag to compare

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

03 Oct 23:09
Compare
Choose a tag to compare

breaking changes

  • delete schemaFolder option from pal.js and now we use the same way of prisma CLI
pal g --schema=./alternative/schema.prisma

https://pris.ly/d/prisma-schema-location

  • delete prismaClientPath option because now we use getDMMF from @prisma/sdk package and all we need now schemaPath

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

30 Sep 19:14
Compare
Choose a tag to compare

drop supporting Nexus Framework

breaking change

change generator name from nexus-schema to be nexus

v2.0.2

30 Sep 08:04
Compare
Choose a tag to compare

Schema camel case converter

  • Skip converting relations fields name.
  • Skip converting the names of the enum.

v2.0.1

29 Sep 22:49
Compare
Choose a tag to compare

Fix #133
Fix #122

breaking change

sdlInputs to add all inputs now function

import { sdlInputs } from '@paljs/plugins';

export default mergeTypeDefs([sdlInputs()]);

There are many changes in Prisma dmmf in version 2.8.0 we tested everything and update our package to work with prisma v2.8.0

v2.0.0

29 Sep 19:09
Compare
Choose a tag to compare

Fix #122

breaking change

sdlInputs to add all inputs now function

import { sdlInputs } from '@paljs/plugins';

export default mergeTypeDefs([sdlInputs()]);

prisma dmmf changed in 2.8.0 our generator now update to work with new dmmf

v1.6.0

29 Sep 15:03
Compare
Choose a tag to compare

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

26 Sep 14:17
Compare
Choose a tag to compare

Prisma Select

#131 fix

To use Custom type name instead of the model name and also has a filter you need to add a comment before the prisma model

example

/// @PrismaSelect.map([ConfigType])
model Config {
   id               string
   configName       string
}

V1.5.5

23 Sep 15:43
Compare
Choose a tag to compare

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

21 Sep 15:00
Compare
Choose a tag to compare

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 throught JSON.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);