Skip to content

Releases: paljs/prisma-tools

v7.0.0

30 May 17:53
Compare
Choose a tag to compare

Major Changes

  • We encourage you to update your applications to utilize the newest features and improvements.

    Key Changes

    • Prisma (5.14): We have upgraded Prisma to version 5.14 to leverage recent Prisma features and improvements.
    • React (18): We have also upgraded React to version 18 to take advantage of the latest React features.
    • ESLint (9): The project now uses ESLint version 9 for an improved and more effective linting process.
    • Admin Taple: We broke changes if you use custom inputs. We updated the way we send react-hool form props by using useContext and useControler

    Breaking Changes

    We had to introduce some breaking changes while making these changes. As such, please exercise caution and test your applications thoroughly after the upgrade.

    Fixes

    We have fixed many issues and are optimizing our package to provide a smoother development experience.


    Please update your applications with these new versions and let us know if you encounter any issues. We always strive to improve our products and appreciate your feedback!

    (Note: Always back up your projects before applying any major updates to avoid unexpected data loss)

    Stay tuned for more updates!

What's Changed

  • Set PNPM as package manager for VS Code by @f8k8 in #327
  • Fix path test for Windows by @f8k8 in #328
  • Fix errors relating to exporting types by @f8k8 in #329
  • Bump graphql from 16.6.0 to 16.8.1 by @dependabot in #315
  • Bump postcss from 8.4.14 to 8.4.31 by @dependabot in #318
  • Update the aggregate resolver return type by @f8k8 in #321

Full Changelog: v6.0.6...v7.0.0

v6.0.6

11 Sep 15:19
Compare
Choose a tag to compare

What's Changed

  • Make findMany return a non-nullable array by @f8k8 in #312
  • Bump @apollo/server from 4.5.0 to 4.9.3 by @dependabot in #313

New Contributors

Full Changelog: v6.0.3...v6.0.6

v6.0.3

25 Aug 19:41
Compare
Choose a tag to compare

What's Changed

  • Handle extended WhereUnique arguments by @f8k8 in #311

Full Changelog: v6.0.2...v6.0.3

v6.0.2

23 Aug 18:54
Compare
Choose a tag to compare

What's Changed

Full Changelog: v6.0.0...v6.0.2

v6.0.0

20 Aug 21:00
Compare
Choose a tag to compare

Breaking changes

Replace your graphql queries into the front end and change.

// for null able relation
- where: { user: { type: { equals: USER } } }
+ where: { user: { is: { type: { equals: USER } } } }

// change relation update id 
- userId: user.id,
+ user: { connect: { id: user.id } },

// change the orderBy for null able fields 
- orderBy: [{ startDate: desc }]
+ orderBy: [{ startDate: { sort: desc } }]

What's Changed

New Contributors

Full Changelog: v5.2.0...v6.0.0

v5.2.0

01 Jan 05:55
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v5.0.3...v5.2.0

v5.0.3

17 Nov 17:19
Compare
Choose a tag to compare

Fix many issues into the v5.0.0

v5.0.0

17 Nov 11:33
Compare
Choose a tag to compare
  • using PNPM instead of Yarn, learn
  • using the Jest framework to add some tests to our project.
  • using GitHub Actions for running tests.
  • upgrade to support Prisma 4.
  • using graphql-parse-resolve-info package in PrismaSelect plugin

[breaking changes] we have a lot of breaking changes

  • The config file name changed from pal.(js|json) to be pal.config.(js|json) to fix an issue with windows #230
  • PrismaDelete plugin totally removed, and we don't need it now Prisma support this option.
  • remove some options from the nexus paljs plugin
 // send custom dmmf if you have custom generated client path for generate input types
  dmmf?: DMMF.Document[];
  // take an array of field names to exclude from any input type
  excludeFields?: string[];
  // take a function and the input object as arg and return array of fields you want to generate
  filterInputs?: (input: DMMF.InputType) => DMMF.SchemaArg[];
  // by default when we create update inputs you will set data like {username: {set: "Ahmed"}} by making this option true you will be able to use it like {username: "Ahmed"} without set.
  // but you will also lose these options for number fields
  // increment: x: Adds x to the current value
  // decrement: x: Subtracts x from the current value
  // multiply: x: Multiplies the current value by x
  // divide: x: Divides the current value by x
  // set: x: Sets the value to x (equivalent to data: { age: 18 })
  doNotUseFieldUpdateOperationsInput?: boolean;

We added them to pal.config.js

excludeInputFields?: string[];
filterInputs?: (input: DMMF.InputType) => DMMF.SchemaArg[];
  • SDL first update we changed our way to generate inputs from run time to file system, so we don't need to generate inputs every time we run the server.
// src/graphql/typeDefs.ts
- import { sdlInputs } from '@paljs/plugins';
+ import InputTypes from './InputTypes';

- export default mergeTypeDefs([sdlInputs()]);
+ export default mergeTypeDefs([InputTypes]);

v4.0.0

09 Sep 19:05
Compare
Choose a tag to compare

Breaking changes

  • Must have Prisma version 3.x not working with Prisma 2.x to work with Prisma 2.x use Pal.Js 3.x.
  • distinct Input arg into findMany, findCount, findFirst now is array of enums
  • orderBy input arg into findMany, findCount, findFirst, aggregate his name was changed.
export const UserFindFirstQuery = queryField('findFirstUser', {
  type: 'User',
  args: {
    where: 'UserWhereInput',
-   orderBy: list('UserOrderByInput'),
+   orderBy: list('UserOrderByWithRelationInput'),
    cursor: 'UserWhereUniqueInput',
    take: 'Int',
    skip: 'Int',
-   distinct: 'UserScalarFieldEnum',
+   distinct: list('UserScalarFieldEnum'),
  },
  resolve(_parent, args, { prisma, select }) {
    return prisma.user.findFirst({
      ...args,
      ...select,
    })
  },
})

Upgrade guide

nexus generator

In nexus we do not write on the queries or mutations files you must delete these files if you did not have any custom work on it and re-run pal g again. Or if you have some custom work on these files you will need to go inside these files and change the args as we show in the diff code

SDL generator

In SDL generator we rewrite on the typeDef file to apply the changes coming from prisma schema so all you need to do is pal g and our script will update the types for you

v3.8.2

14 Aug 21:44
Compare
Choose a tag to compare

New feature [CLI Create]

Support Charka UI as a UI framework on Nextjs template