-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
141 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 `<Model>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 | ||
|
||
<table> | ||
<tbody> | ||
<tr> | ||
<td align="center"><a href="https://sylvainsimao.fr"><img src="https://avatars.githubusercontent.com/u/4679377?v=4?s=100" width="100px;" alt="Sylvain"/><br /><sub><b>Sylvain</b></sub></a><br /><a href="#maintainer-maoosi" title="Maintainer">🧙♂️</a> <a href="https://github.com/maoosi/prisma-appsync/commits?author=maoosi" title="Code">💻</a> <a href="#ideas-maoosi" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/maoosi/prisma-appsync/commits?author=maoosi" title="Documentation">📖</a></td> | ||
<td align="center"><a href="http://www.cipriancaba.com"><img src="https://avatars.githubusercontent.com/u/695515?v=4?s=100" width="100px;" alt="Ciprian Caba"/><br /><sub><b>Ciprian Caba</b></sub></a><br /><a href="https://github.com/maoosi/prisma-appsync/commits?author=cipriancaba" title="Code">💻</a> <a href="#ideas-cipriancaba" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
<td align="center"><a href="http://bell.moe"><img src="https://avatars.githubusercontent.com/u/3979239?v=4?s=100" width="100px;" alt="Bell"/><br /><sub><b>Bell</b></sub></a><br /><a href="https://github.com/maoosi/prisma-appsync/commits?author=Tenrys" title="Code">💻</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
## Github sponsors | ||
|
||
Enjoy using Prisma-AppSync? Please consider [💛 Github sponsors](https://github.com/sponsors/maoosi). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
eadcf64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
prisma-appsync – ./
prisma-appsync.vercel.app
prisma-appsync-maoosi.vercel.app
prisma-appsync-git-main-maoosi.vercel.app