Skip to content

1.0.0-beta.52

Pre-release
Pre-release
Compare
Choose a tag to compare
@maoosi maoosi released this 25 Apr 09:53
· 389 commits to main since this release

⚠️ Breaking

  • Feat: Providing easier access to Prisma Client
// initialise client
const app = new PrismaAppSync({
    connectionUrl: process.env.CONNECTION_URL
})

// access Prisma client
app.prisma.$use(async (params, next) => {
  console.log('This is middleware!')
  return next(params)
})

Migration guide:

  • app.$disconnect replaced with app.prisma.$disconnect.
  • prisma parameter removed from the before and after hooks functions, as well as from the customResolvers parameters. To access prisma from within hooks, directly use app.prisma.

Non-breaking

  • Feat: Support for prisma ^2.21.2 added.
  • Feat: Lambda bundle size reduced (provided CDK boilerplate).
afterBundling(inputDir: string, outputDir: string): string[] {
    return [
        'npx prisma generate', 
        'rm -rf node_modules/@prisma/engines', 
        'rm -rf node_modules/@prisma/client/node_modules', 
        'rm -rf node_modules/.bin', 
        'rm -rf node_modules/prisma',
        'rm -rf node_modules/prisma-appsync',
    ]
}
  • Feat: Contribution guide added (see CONTRIBUTING.md) with new boilerplate testing workflow.
  • Feat: Core library is now using Pnpm instead of Yarn.