Skip to content

Commit

Permalink
Latest release notes. (#5908)
Browse files Browse the repository at this point in the history
  • Loading branch information
bladey committed Jun 15, 2021
1 parent 20f8a01 commit 2eabe4d
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/pages/releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { Status } from '../components/Status';

# Releases

## 2nd June 2021
## 15th June 2021

<Status look="latestRelease" />

Keystone Next now has a new core 🤖, unblocking many of the features you’ve been waiting for! — [read more](/releases/2021-06-15)

## 2nd June 2021

We have a new JSON field ✨, a bunch of new learning resources, and plenty of under the hood optimisations in this big release. 💪 — [read more](/releases/2021-06-02)

## 19th May 2021
Expand Down
96 changes: 96 additions & 0 deletions docs/pages/releases/2021-06-15.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import { Markdown } from '../../components/Page';

# Release

## 15th June 2021

## What's New

Keystone Next now has a new core 🤖, unblocking many of the features you’ve been waiting for!

After months of work deep in the codebase, it’ll be much easier for us to ship roadmap features like **custom field types**, **GraphQL Schema extensions**, and more.

⚠️ This release does come with some minor behavioural changes to Keystone’s APIs, read on below.

```sh
"@keystone-next/admin-ui-utils": "5.0.2",
"@keystone-next/auth": "27.0.0",
"@keystone-next/cloudinary": "6.0.0",
"@keystone-next/fields-document": "7.0.0",
"@keystone-next/fields": "11.0.0",
"@keystone-next/keystone": "20.0.0",
"@keystone-next/test-utils-legacy": "21.0.0",
"@keystone-next/types": "20.0.0",
"@keystone-next/utils-legacy": "12.0.0",
"@keystone-ui/core": "3.1.0",
"@keystone-ui/fields": "4.1.1",
"@keystone-ui/segmented-control": "4.0.1",
```

## New Core 🤖

The core of Keystone has been re-implemented to make implementing fields and new features in Keystone easier. While the observable changes for most users should be minimal, there could be breakage 🤖.

⚠️ If you implemented a custom field type, you will need to change it to the new API, see fields in the `@keystone-next/fields` [package](https://github.com/keystonejs/keystone/tree/master/packages-next/fields) for inspiration on how to do this.

### Password tweaks 🔒

The `password` field type now adds a GraphQL type `PasswordState` to the GraphQL output type instead of adding `${fieldKey}_is_set`, exposing a `isSet` boolean.

```
type User {
password: PasswordState
}
type PasswordState {
isSet: Boolean!
}
```

### Access control operations 👑

List level `create`, `update` and `delete` access control is now called for each operation in a many operation rather than on all of the operations as a whole.

This means that rather than receiving `originalInput` as an array with `itemIds`, your access control functions will always be called with just an `itemId` and/or `originalInput` (depending on which access control function it is).

⚠️ If your access control functions already worked with creating/updating/deleting one item, they will continue working (though you may get TypeScript errors if you were previously handling `itemIds` and `originalInput` as an array, to fix that, you should stop handling that case).

In addition, filters returned from access control now go through GraphQL validation and coercion like filters that you pass in through the GraphQL API, this will produce better errors when you return invalid values.

### Virtual field input 🔣

The API to configure `virtual` fields has changed to accept a `field` using the `schema` API exported from `@keystone-next/types` rather than GraphQL SDL.

### Schema reorder 🍡

The ordering of relationships fields in the generated Prisma schema has changed so that it aligns with the order specified in the list config with the opposites to one-sided relationships added at the end.

The name of one-to-one and one-to-many relationships has also changed to include `_` between the list key and field key to align with many-to-many relationships.

⚠️ Note that these changes do **not require a migration**, only your `schema.prisma` file will need to be updated with `keystone-next dev` or `keystone-next postinstall --fix`.

## Text and integer filtering 🌈

A long awaited feature, you can now find an item by a unique field! Filtering now works for `text` and `integer` fields that have `isUnique: true` set, for example:

```
query {
Post(where: { slug: "something-something-something" }) {
id
title
content
}
}
```

## UI Accessibility 🏷️

A number of updates have been made in this release to improve accessibility in the Admin UI — updates to the `DatePicker` labels, relationship fields and more, including visual updates to the segment control (when no value is selected).

## Prisma update ⬆️

We've updated our Prisma dependencies to `2.24.1`, check out the [Prisma releases page](https://github.com/prisma/prisma/releases/tag/2.24.1) for more information.

You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-06-15) on GitHub.

export default ({ children }) => <Markdown>{children}</Markdown>;

1 comment on commit 2eabe4d

@vercel
Copy link

@vercel vercel bot commented on 2eabe4d Jun 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.