Releases: paljs/prisma-tools
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
v3.8.2
v3.6.0
Drop using onDelete
plugin while Prisma 2.26.0 have this feature
- drop from
pal.js
file. - drop from context file
- drop from generator
[admin]
- fix some styling issues
v3.5.0
[Admin]
- Update the filter for the prisma react component
- fix many issues in connect and disconnect relations on the update page
v3.4.0
v3.3.6
v3.2.0
v3.0.0
Breaking changes
[admin]
Changing all the Admin
components and working with Tailwind CSS
instead of @paljs/ui
so you can now use our component with any CSS framework.
update import path for PrismaTaple
component to reduce the size of the pages
Old code will still work
import React from 'react';
import { useRouter } from 'next/router';
-import { PrismaTable } from '@paljs/admin';
+import { PrismaTable } from '@paljs/admin/PrismaTable';
-import 'react-quill/dist/quill.snow.css';
-import 'react-datepicker/dist/react-datepicker.css';
+import '@paljs/admin/style.css';
const Table: React.FC<{ model: string }> = ({ model }) => {
const router = useRouter();
return <PrismaTable model={model} push={router.push} query={router.query} />;
};
export default Table;
update import path for Settings
component to reduce the size of the pages
import React from 'react';
-import { Settings } from '@paljs/admin';
+import { Settings } from '@paljs/admin/Settings';
+import '@paljs/admin/style.css';
export default function SettingsPage() {
// Settings component not have any props
return <Settings />;
}
We do not provide a quill editor anymore the default field if the editor option is true will be string until you provide a custom Editor component
New Features
[CLI]
NextJS Template
- add a new option to select the UI framework
- Use multi schema template option
- Do you need to use Git
➜ ~ pal c
.______ ___ __ __ _______.
| _ \ / \ | | | | / |
| |_) | / ^ \ | | | | | (----`
| ___/ / /_\ \ | | .--. | | \ \
| | / _____ \ | `----.| `--' | .----) |
| _| /__/ \__\ |_______| \______/ |_______/
✔ Please select your start example · full-stack-nextjs
+? Please select your start framework …
❯ Material UI
Material UI + PrismaAdmin UI
Tailwind CSS
Tailwind CSS + PrismaAdmin UI
+? Use multi schema template …
❯ no
yes
+? Do you need to use Git …
❯ yes
no
v2.14.0
v2.13.0
Update to Prisma v2.17.0
#186 need to set default pageSize of PrismaTable
#181 Problem with gql generation when using the following scalar array type
#179 updateOneUser error with One-to-Many relationship
#180 Consider allowing defaultFields to be invokable
#184 basic filters export for custom table