1.0.0-beta.56
Pre-release
Pre-release
⚠️ Breaking
- Feat: Introducing pagination on list queries.
- Feat: Introducing entirely refactored filters on list queries, closer to the Prisma syntax.
Filtering (breaking)
To simplify both usage and implementation, filtering on fields and relations have been refactored entirely. The syntax is now closer to how Prisma handles filtering.
# before
query {
listPosts(
where: { title_startsWith: "Foo" }
) {
title
}
}
# after (1.0.0-beta.56+)
query {
listPosts(
where: { title: { startsWith: "Foo" } }
) {
title
}
}
# before
query {
listPosts(
where: { title: "Foo" }
) {
title
}
}
# after (1.0.0-beta.56+)
query {
listPosts(
where: { title: { equals: "Foo" } }
) {
title
}
}
Some Types have also been renamed for more consistency:
CreateRelations
renamed toCreateRelationsInput
UpdateRelations
renamed toUpdateRelationsInput
WhereInput
renamed toWhereFilterInput
Pagination (breaking)
Introducing pagination on list queries (using Prisma offset pagination).
# after (1.0.0-beta.56+)
query {
listPosts(
skip: 0
take: 20
) {
title
}
}
If the take
parameter is omitted, PrismaAppSync will use a default value of 50
. It is also possible to change the default value:
// Set the default value to 50, if the `take` parameter is omitted.
const app = new PrismaAppSync({
connectionUrl: process.env.DB_CONNECTION_URL,
defaultPagination: 20
})
// Disable pagination limit, if the `take` parameter is omitted.
const app = new PrismaAppSync({
connectionUrl: process.env.DB_CONNECTION_URL,
defaultPagination: false
})
Non-breaking
- Fix: Has no exported member 'Prisma' issue resolved (issues/11)