Repository navigation
v4.0.0
Breaking changes
- Must have Prisma version
3.xnot working with Prisma2.xto work with Prisma2.xuse Pal.Js3.x. distinctInput arg intofindMany,findCount,findFirstnow is array of enumsorderByinput arg intofindMany,findCount,findFirst,aggregatehis 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