Releases: paljs/prisma-tools
v7.1.0
What's Changed
- Add more generic line separator in getting models and enums regexp by @theArina in #336
- Fix CreateManyAndReturn type by @f8k8 in #337
- Don't check error message due to platform path separator differences by @f8k8 in #339
- Feature: Extract default values by @lucasmezencio in #342
- fix: remove unnecessary double quotes by @lucasmezencio in #343
- feat: Improvements to get default value by @lucasmezencio in #344
New Contributors
- @theArina made their first contribution in #336
- @lucasmezencio made their first contribution in #342
Full Changelog: v7.0.0...v7.1.0
v7.0.0
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
anduseControler
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
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
- @dependabot made their first contribution in #313
Full Changelog: v6.0.3...v6.0.6
v6.0.3
What's Changed
Full Changelog: v6.0.2...v6.0.3
v6.0.2
What's Changed
- Fix many issues by @AhmedElywa in #309
- Enable building on Windows by @f8k8 in #310
Full Changelog: v6.0.0...v6.0.2
v6.0.0
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
- Update package.json by @rachelhigley in #291
- fix(nexus): matches the nexus generated bigint type by @guog in #296
- Handle @id & @unique with arguments by @f8k8 in #307
New Contributors
- @rachelhigley made their first contribution in #291
- @guog made their first contribution in #296
- @f8k8 made their first contribution in #307
Full Changelog: v5.2.0...v6.0.0
v5.2.0
What's Changed
- Fix prisma select plugin by @AhmedElywa in #286
- fix: graphql peerdep version syntax by @songkeys in #288
New Contributors
Full Changelog: v5.0.3...v5.2.0
v5.0.3
Fix many issues into the v5.0.0
v5.0.0
- using
PNPM
instead ofYarn
,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 bepal.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
Breaking changes
- Must have Prisma version
3.x
not working with Prisma2.x
to work with Prisma2.x
use Pal.Js3.x
. distinct
Input arg intofindMany
,findCount
,findFirst
now is array of enumsorderBy
input arg intofindMany
,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