diff --git a/.vscode/settings.json b/.vscode/settings.json index 56f46c9..e951483 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -114,6 +114,11 @@ "language": "markdown", "scheme": "file", "pattern": "docs/changelog/1.0.0-rc.4.md" + }, + { + "language": "markdown", + "scheme": "file", + "pattern": "docs/changelog/1.0.0-rc.5.md" } ] } diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 2b2552e..b4a6aa3 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -75,7 +75,8 @@ export default defineConfig({ { text: 'Changelog', items: [ - { text: '(latest) 1.0.0-rc.4', link: '/changelog/1.0.0-rc.4' }, + { text: '(latest) 1.0.0-rc.5', link: '/changelog/1.0.0-rc.5' }, + { text: '1.0.0-rc.4', link: '/changelog/1.0.0-rc.4' }, { text: '1.0.0-rc.3', link: '/changelog/1.0.0-rc.3' }, { text: '1.0.0-rc.2', link: '/changelog/1.0.0-rc.2' }, { text: '1.0.0-rc.1', link: '/changelog/1.0.0-rc.1' }, diff --git a/docs/changelog/1.0.0-rc.5.md b/docs/changelog/1.0.0-rc.5.md new file mode 100644 index 0000000..efdc3c6 --- /dev/null +++ b/docs/changelog/1.0.0-rc.5.md @@ -0,0 +1,132 @@ +--- +editLink: false +--- + +# 1.0.0-rc.5 + +**🌟 Help us spread the word about Prisma-AppSync by starring the repo.** + +## Highlights + +### ⚡️ Async shield rules + +Async Shield rules are now supported in Prisma-AppSync, opening up to 3 different ways to define fine-grained access control rules: + +```ts +return await prismaAppSync.resolve({ + event, + shield: () => { + return { + // Boolean + 'listPosts{,/**}': { rule: true }, + + // Function + 'listPosts{,/**}': { rule: () => true }, + + // (NEW) Async Function + 'listPosts{,/**}': { + rule: async () => { + await sleep(1000) + return true + }, + }, + } + }, +}) +``` + +### ⚡️ Support for deeply nested relation filters + +Deeply nested relation filters are now supported in Prisma-AppSync, allowing to perform the following queries: + +```graphql +query { + listComments( + where: { + author: { + + # deeply nested relation filter + posts: { + every: { + published: { equals: true } + } + } + + } + } + ) +} +``` + +```graphql +query { + listUsers( + where: { + posts: { + every: { + + # deeply nested relation filter + comments: { + every: { + message: { startsWith: 'hello' } + } + } + + } + } + } + ) +} +``` + +### ⚡️ Support for `extendedWhereUnique` preview feature + +Using the `extendedWhereUnique` preview feature flag will enable filtering on non-unique fields in Prisma-AppSync, allowing to do the following: + +```prisma +generator client { + provider = "prisma-client-js" + previewFeatures = ["extendedWhereUnique"] +} +``` + +```graphql +mutation($id: Int!, $version: Int) { + updatePost( + # version is a non-unique field + where: { id: $id, version: { equals: $version } }, + operation: { version: { increment: 1 } } + ) { + id + version + } +} +``` + +See [Prisma Docs](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#filter-on-non-unique-fields-with-userwhereuniqueinput) for more details. + +## Fixes and improvements + +- [`maxDepth` parameter not working properly with Json fields (Issue #71).](https://github.com/maoosi/prisma-appsync/issues/71) +- [Local dev server reads `undefined` when using nested arrays in query (Issue #83).](https://github.com/maoosi/prisma-appsync/issues/81) +- [GraphQL input `WhereUniqueInput` shouldn’t include Relation fields (Issue #83).](https://github.com/maoosi/prisma-appsync/issues/83) +- [Unit tests for Prisma to GraphQL schema conversion (Issue #84).](https://github.com/maoosi/prisma-appsync/issues/84) +- [Local dev server returning `null` for `0` values (PR #82).](https://github.com/maoosi/prisma-appsync/pull/82) +- [Issue: fields with `@default` should appear as required `!` in generated GraphQL schema base type (Issue #91).](https://github.com/maoosi/prisma-appsync/issues/91) +- Improved, more readable, Prisma Client errors logs. + +## Credits + + + + + + + + + +
Sylvain
Sylvain

🧙‍♂️ 💻 🤔 📖
Ciprian Caba
Ciprian Caba

💻 🤔
Bell
Bell

💻
+ +## Github sponsors + +Enjoy using Prisma-AppSync? Please consider [💛 Github sponsors](https://github.com/sponsors/maoosi). diff --git a/docs/changelog/index.md b/docs/changelog/index.md index 779354a..a31adf7 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -1,6 +1,7 @@ # Changelog -- [(latest) 1.0.0-rc.4](/changelog/1.0.0-rc.4.html) +- [(latest) 1.0.0-rc.5](/changelog/1.0.0-rc.5.html) +- [1.0.0-rc.4](/changelog/1.0.0-rc.4.html) - [1.0.0-rc.3](/changelog/1.0.0-rc.3.html) - [1.0.0-rc.2](/changelog/1.0.0-rc.2.html) - [1.0.0-rc.1](/changelog/1.0.0-rc.1.html) \ No newline at end of file