github keystonejs/keystone 2021-07-13
✨ 13th July 2021

latest releases: 2024-04-30, @keystone-6/core@6.1.0, @keystone-6/core@0.0.0-rc-20240429035832...
2 years ago

What's New

More examples, types, and UI rendering tweaks as we push forward towards a general availability release! 🚀

"@keystone-ui/core": "3.1.1",
"@keystone-next/admin-ui-utils": "5.0.4",
"@keystone-next/auth": "29.0.0",
"@keystone-next/cloudinary": "6.0.4",
"@keystone-next/document-renderer": "4.0.0",
"@keystone-next/fields": "12.0.0",
"@keystone-next/fields-document": "7.0.2",
"@keystone-next/keystone": "22.0.0",
"@keystone-next/session-store-redis": "3.0.2",
"@keystone-next/testing": "1.0.2",
"@keystone-next/types": "22.0.0",
"@keystone-next/utils": "1.0.2",

New Examples 📖

Custom Field Views

We have a new example for custom field views, demonstrating how to create a custom field view for a JSON field. This example allows users to add, edit and remove navigation items from a list:

image

Inline Relationship in Document Field

Rendering an inline relationship for the document field has been added to the existing example project as well as our docs page:

image

Be sure to check out all the examples, with more to come.

Document Rendering Improvements 📇

If an item referenced in a document field is deleted from Keystone, the document field now handles this gracefully. Before an error would be returned when querying the field, which prevents the user from being able to manage the issue.

This release fixes this to simply return null for the missing item. This also covers the behavior for when a user doesn't have read access for an item.

UI Fixes ⚙️

A variety of UI fixes are in this release when rendering fields in the Admin UI:

  • The value of data passed to the inline relationship renderer now matches the data returned by the GraphQL query.
  • Falsey values of data.label are no longer set to data.id and falsey values of data.data are no longer set to {}.
  • Fixed the relationship name not being passed to the inline relationship renderer.
  • Fixed confusing error when providing fields that don't exist to ui.cardFields, ui.inlineCreate.fields and ui.inlineEdit.fields.
  • Fixed relationship field with displayMode: 'cards' not using labels for related items in the cell view.

Types for KeystoneContext, KeystoneListsAPI and KeystoneDbAPI 🪢

We've added generated types for KeystoneContext, KeystoneListsAPI and KeystoneDbAPI.

You can now import these from .keystone/types (instead of @keystone-next/types) to get types that are pre-bound to your project's schema.

Housekeeping 🧹

Another update for Prisma, version 2.26.0, check out the Prisma releases page for more details.

Our packages-next folder has moved over to packages as part of our push to a general availability release in the near future!

Enjoying Keystone?

Star this repo 🌟 ☝️ or connect to Keystone on Twitter and in Slack.


View verbose release notes

Releases

@keystone-next/document-renderer@4.0.0

Major Changes

  • #6040 890e3d0a5 Thanks @timleslie! - The value of data passed to the inline relationship renderer now matches the data returned by the GraphQL query.
    Falsey values of data.label are no longer set to data.id and falsey values of data.data are no longer set to {}.

Patch Changes

@keystone-next/fields@12.0.0

Major Changes

Patch Changes

@keystone-next/keystone@22.0.0

Major Changes

Patch Changes

  • #6087 139d7a8de Thanks @JedWatson! - Move source code from the packages-next to the packages directory.

  • #6094 279403cb0 Thanks @timleslie! - Refactored internal nested mutation input handler code.

  • #6045 253df44c2 Thanks @mitchellhamilton! - Adjusted when getAdminMeta is called on fields so that they can see the metadata (excluding the results of getAdminMeta on fields) of other fields to do validation or etc.

  • #6093 f482db633 Thanks @JedWatson! - Added generated types for KeystoneContext, KeystoneListsAPI and KeystoneDbAPI.

    You can now import these from .keystone/types (instead of @keystone-next/types) to get types that are pre-bound to your project's schema.

  • Updated dependencies [38b78f2ae, 5f3d407d7, 139d7a8de, 253df44c2, c536b478f]:

    • @keystone-next/fields@12.0.0
    • @keystone-next/types@22.0.0
    • @keystone-ui/core@3.1.1
    • @keystone-next/admin-ui-utils@5.0.4
    • @keystone-next/utils@1.0.2

@keystone-next/types@22.0.0

Major Changes

Patch Changes

@keystone-ui/core@3.1.1

Patch Changes

@keystone-next/admin-ui-utils@5.0.4

Patch Changes

@keystone-next/auth@29.0.0

Patch Changes

@keystone-next/cloudinary@6.0.4

Patch Changes

@keystone-next/fields-document@7.0.2

Patch Changes

  • #6087 139d7a8de Thanks @JedWatson! - Move source code from the packages-next to the packages directory.

  • #6040 890e3d0a5 Thanks @timleslie! - Fixed the behaviour of document(hydrateRelationships: true) when a related item no longer exists or read access is denied.
    The resolver will now set the relationship data to be { id }, leaving the label and data properties undefined.

  • Updated dependencies [38b78f2ae, 5f3d407d7, 139d7a8de, 279403cb0, 253df44c2, 253df44c2, f482db633, c536b478f]:

    • @keystone-next/fields@12.0.0
    • @keystone-next/keystone@22.0.0
    • @keystone-next/types@22.0.0
    • @keystone-ui/core@3.1.1
    • @keystone-next/admin-ui-utils@5.0.4

@keystone-next/session-store-redis@3.0.2

Patch Changes

@keystone-next/testing@1.0.2

Patch Changes

@keystone-next/utils@1.0.2

Patch Changes

@keystone-next/example-custom-field-view@1.0.0

Major Changes

Patch Changes

@keystone-next/example-document-field@1.1.0

Minor Changes

Patch Changes

@keystone-next/website@3.1.3

Patch Changes

@keystone-next/example-assets-cloud@1.0.2

Patch Changes

@keystone-next/example-assets-local@1.0.2

Patch Changes

@keystone-next/example-auth@4.0.4

Patch Changes

@keystone-next/examples-app-basic@4.0.4

Patch Changes

@keystone-next/example-ecommerce@4.0.5

Patch Changes

@keystone-next/example-embedded-nextjs@3.0.4

Patch Changes

keystone-next-app@1.0.4

Patch Changes

@keystone-next/example-playground@1.0.3

Patch Changes

@keystone-next/example-roles@4.0.4

Patch Changes

@keystone-next/example-sandbox@3.0.4

Patch Changes

@keystone-next/example-blog@2.0.4

Patch Changes

@keystone-next/example-custom-field@0.0.1

Patch Changes

@keystone-next/example-default-values@1.0.4

Patch Changes

@keystone-next/example-extend-graphql-schema@1.0.4

Patch Changes

@keystone-next/example-json-field@4.0.5

Patch Changes

@keystone-next/example-task-manager@4.0.4

Patch Changes

@keystone-next/example-testing@0.0.4

Patch Changes

@keystone-next/example-virtual-field@0.1.2

Patch Changes

@keystone-next/example-with-auth@2.0.5

Patch Changes

@keystone-next/admin-ui-tests@0.0.2

Patch Changes

  • Updated dependencies [38b78f2ae, 5f3d407d7, 139d7a8de]:
    • @keystone-next/types@22.0.0
    • @keystone-next/testing@1.0.2
    • @keystone-next/utils@1.0.2

@keystone-next/api-tests-legacy@11.0.5

Patch Changes

  • #6087 139d7a8de Thanks @JedWatson! - Move source code from the packages-next to the packages directory.

  • #6040 890e3d0a5 Thanks @timleslie! - Fixed the behaviour of document(hydrateRelationships: true) when a related item no longer exists or read access is denied.
    The resolver will now set the relationship data to be { id }, leaving the label and data properties undefined.

  • Updated dependencies [38b78f2ae, 5f3d407d7, 139d7a8de]:

    • @keystone-next/types@22.0.0
    • @keystone-next/testing@1.0.2
    • @keystone-next/utils@1.0.2

@keystone-next/benchmarks-legacy@7.0.5

Patch Changes

@keystone-next/test-projects-basic@0.0.1

Patch Changes

Don't miss a new keystone release

NewReleases is sending notifications on new releases.