You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,50 @@
1
1
# Changelog
2
2
3
+
## Version 1.0.0-beta.52
4
+
5
+
### ⚠️ Breaking
6
+
7
+
- Feat: Providing easier access to Prisma Client
8
+
9
+
```typescript
10
+
// initialise client
11
+
const app =newPrismaAppSync({
12
+
connectionUrl: process.env.CONNECTION_URL
13
+
})
14
+
15
+
// access Prisma client
16
+
app.prisma.$use(async (params, next) => {
17
+
console.log('This is middleware!')
18
+
returnnext(params)
19
+
})
20
+
```
21
+
22
+
**Migration guide:**
23
+
24
+
-`app.$disconnect` replaced with `app.prisma.$disconnect`.
25
+
-`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`.
If you have found a bug or have a feature request then please create an issue in this repository (please search first in case a similar issue already exists).
6
+
7
+
## Code
8
+
9
+
### General Prerequisites
10
+
11
+
1. Node.js, [latest LTS is recommended](https://nodejs.org/en/about/releases/)
To quickly create a test app using your local `prisma-appsync` directory, follow these steps:
46
+
47
+
```bash
48
+
# make sure to run from the same level as `prisma-appsync` dir
49
+
[ -d"./prisma-appsync" ] &&echo"You are at the right location."||echo"Wrong location. Make sure to be at the same level as prisma-appsync dir."
50
+
51
+
# run the generator using the --test parameter
52
+
yarn create prisma-appsync-app . --test
53
+
54
+
# cd into the new test app folder
55
+
cd prisma-appsync-testapp-<timestamp>
56
+
57
+
# run prisma generate and deploy on AWS
58
+
yarn deploy
59
+
```
60
+
61
+
> Please note that `yarn create prisma-appsync-app . --test` will use a special version of the Prisma-AppSync boilerplate that will automatically link the prisma-appsync dependency to your local dev setup (`prisma-appsync` directory located at the same level).
62
+
63
+
## Legal
64
+
65
+
By submitting your code to the Prisma-AppSync project, you are granting the project maintainers a right to use that code and provide it to others under the BSD 2-Clause License attached to the project. You are also certifying that you wrote it, and that you are allowed to license it to us.
0 commit comments