github keystonejs/keystone 2021-04-20
✨ Release - 20th April 2021

latest releases: create-keystone-app@10.0.2, create-keystone-app@10.0.1, @keystone-6/core@6.3.0...
3 years ago

What's New

Improvements to the Lists API

To make the Lists API (i.e context.lists.{List}) more intuitive to use, we deprecated the resolveFields option in favour of two new methods 🔧:

1. Specify a string of fields to return with the new query option:

Use this when you want to query for resolved field values (including querying relationships and virtual fields). This replaces the resolveFields: false use case. Now you can query a Post like so:

const [post] = await context.lists.Post.findMany({
  where: { slug },
  query: `
    title
    content
    image {
      src
      width
      height
    }`,
});

2. Return the unresolved item data with read hooks

This replaces the resolveFields: boolean use case. We now have a new set of APIs on context.db.lists.{List} which return unresolved item data from your database (but with read hooks applied). They can be referenced directly or returned from a custom mutation or query in the GraphQL API to be handled by the Field resolvers.

For example, to query for the raw data stored in the database:

const [post] = await context.db.lists.Post.findMany({
  where: { slug },
});

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-ui/button@4.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/icons@3.0.0
    • @keystone-ui/loading@3.0.0

@keystone-ui/fields@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/icons@3.0.0
    • @keystone-ui/popover@3.0.0

@keystone-ui/icons@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

@keystone-ui/loading@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

@keystone-ui/modals@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/button@4.0.0

@keystone-ui/notice@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/button@4.0.0
    • @keystone-ui/icons@3.0.0

@keystone-ui/options@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/fields@3.0.0
    • @keystone-ui/icons@3.0.0

@keystone-ui/pill@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/icons@3.0.0

@keystone-ui/popover@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

@keystone-ui/segmented-control@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

@keystone-ui/toast@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/icons@3.0.0

@keystone-ui/tooltip@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • Updated dependencies [a5627304b]:
    • @keystone-ui/popover@3.0.0

@keystone-next/admin-ui@14.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Minor Changes

Patch Changes

  • #5451 9e060fe83 Thanks @JedWatson! - With the goal of making the Lists API (i.e context.lists.{List}) more intuitive to use, the resolveFields option has been deprecated in favor of two new methods:

    (1) You can specify a string of fields to return with the new query option, when you want to query for resolved field values (including querying relationships and virtual fields). This replaces the resolveFields: false use case.

    For example, to query a Post you would now write:

    const [post] = await context.lists.Post.findMany({
      where: { slug },
      query: `
        title
        content
        image {
          src
          width
          height
        }`,
    });

    (2) Alternatively, there is a new set of APIs on context.db.lists.{List} which will return the unresolved item data from the database (but with read hooks applied), which can then be referenced directly or returned from a custom mutation or query in the GraphQL API to be handled by the Field resolvers. This replaces the resolveFields: boolean use case.

    For example, to query for the raw data stored in the database, you would write:

    const [post] = await context.db.lists.Post.findMany({
      where: { slug },
    });
  • #5366 115b06130 Thanks @renovate! - Updated Next.js dependency to ^10.1.3.

  • Updated dependencies [9e060fe83, 3d3fb860f, c7aecec3c, 588f31ddc, 781b3e5ab, 49025d1ad, 7498fcabb, 11f5bb631, d9e1acb30, 24e62e29c, 6861ecb40, 5b2369077, a5627304b, 202d362f3, d0adec53f, 962cde7e3, f67497c1a, 1d85d7ff4, 2bef01aaa, 0e74d8123, 76692d266, d7e8cad4f, ecf07393a, ad1776b74, 309596591, be60812f2, 5b2369077, be60812f2, 115b06130, a73aea7d7]:

    • @keystone-next/keystone@16.0.0
    • @keystone-next/types@17.0.0
    • @keystone-ui/button@4.0.0
    • @keystone-ui/fields@3.0.0
    • @keystone-ui/icons@3.0.0
    • @keystone-ui/loading@3.0.0
    • @keystone-ui/modals@3.0.0
    • @keystone-ui/notice@3.0.0
    • @keystone-ui/options@3.0.0
    • @keystone-ui/pill@3.0.0
    • @keystone-ui/popover@3.0.0
    • @keystone-ui/toast@3.0.0
    • @keystone-ui/tooltip@3.0.0
    • @keystone-next/admin-ui-utils@4.0.0

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

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/auth@21.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/cloudinary@4.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

  • #5420 ecf07393a Thanks @timleslie! - Updated core fields implementation to expect an internal option type.adapter rather than type.adapters.prisma.

Patch Changes

@keystone-next/fields@7.0.0

Major Changes

Minor Changes

Patch Changes

@keystone-next/fields-document@5.0.0

Major Changes

  • #5420 ecf07393a Thanks @timleslie! - Updated core fields implementation to expect an internal option type.adapter rather than type.adapters.prisma.

Patch Changes

@keystone-next/keystone@16.0.0

Major Changes

Minor Changes

  • #5451 9e060fe83 Thanks @JedWatson! - With the goal of making the Lists API (i.e context.lists.{List}) more intuitive to use, the resolveFields option has been deprecated in favor of two new methods:

    (1) You can specify a string of fields to return with the new query option, when you want to query for resolved field values (including querying relationships and virtual fields). This replaces the resolveFields: false use case.

    For example, to query a Post you would now write:

    const [post] = await context.lists.Post.findMany({
      where: { slug },
      query: `
        title
        content
        image {
          src
          width
          height
        }`,
    });

    (2) Alternatively, there is a new set of APIs on context.db.lists.{List} which will return the unresolved item data from the database (but with read hooks applied), which can then be referenced directly or returned from a custom mutation or query in the GraphQL API to be handled by the Field resolvers. This replaces the resolveFields: boolean use case.

    For example, to query for the raw data stored in the database, you would write:

    const [post] = await context.db.lists.Post.findMany({
      where: { slug },
    });
  • #5325 3d3fb860f Thanks @mitchellhamilton! - Updated to Prisma 2.20

  • #5378 6861ecb40 Thanks @renovate! - Updated Prisma to 2.21

  • #5396 be60812f2 Thanks @rohan-deshpande! - Added create-image-context, logic for parsing, storing and retrieving image data in keystone core.

Patch Changes

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

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

@keystone-next/types@17.0.0

Major Changes

  • #5467 7498fcabb Thanks @timleslie! - Removed the deprecated context.executeGraphQL. Identical functionality is available via context.graphql.raw.

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Minor Changes

  • #5451 9e060fe83 Thanks @JedWatson! - With the goal of making the Lists API (i.e context.lists.{List}) more intuitive to use, the resolveFields option has been deprecated in favor of two new methods:

    (1) You can specify a string of fields to return with the new query option, when you want to query for resolved field values (including querying relationships and virtual fields). This replaces the resolveFields: false use case.

    For example, to query a Post you would now write:

    const [post] = await context.lists.Post.findMany({
      where: { slug },
      query: `
        title
        content
        image {
          src
          width
          height
        }`,
    });

    (2) Alternatively, there is a new set of APIs on context.db.lists.{List} which will return the unresolved item data from the database (but with read hooks applied), which can then be referenced directly or returned from a custom mutation or query in the GraphQL API to be handled by the Field resolvers. This replaces the resolveFields: boolean use case.

    For example, to query for the raw data stored in the database, you would write:

    const [post] = await context.db.lists.Post.findMany({
      where: { slug },
    });
  • #5396 be60812f2 Thanks @rohan-deshpande! - Added types for new images functionality in keystone.

Patch Changes

@keystone-next/access-control-legacy@10.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/adapter-prisma-legacy@6.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Minor Changes

Patch Changes

@keystone-next/server-side-graphql-client-legacy@4.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/test-utils-legacy@17.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

  • #5387 406acca51 Thanks @timleslie! - Replaced type AdapterName with ProviderName. Updated all functions which accepted an AdapterName value named adapterName to accept a ProviderName argument named provider.

Patch Changes

@keystone-next/utils-legacy@9.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Minor Changes

  • #5403 d0adec53f Thanks @gwyneplaine! - Added a humanize fn which is string transformation logic ported over from @keystone-next/keystone.

Patch Changes

@keystone-next/document-renderer@2.0.3

Patch Changes

@keystone-ui/website@2.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • #5366 115b06130 Thanks @renovate! - Updated Next.js dependency to ^10.1.3.

  • Updated dependencies [a5627304b]:

    • @keystone-ui/button@4.0.0
    • @keystone-ui/fields@3.0.0
    • @keystone-ui/loading@3.0.0
    • @keystone-ui/modals@3.0.0
    • @keystone-ui/notice@3.0.0
    • @keystone-ui/options@3.0.0
    • @keystone-ui/pill@3.0.0
    • @keystone-ui/popover@3.0.0
    • @keystone-ui/segmented-control@3.0.0
    • @keystone-ui/toast@3.0.0
    • @keystone-ui/tooltip@3.0.0

@keystone-next/website@2.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • #5451 9e060fe83 Thanks @JedWatson! - With the goal of making the Lists API (i.e context.lists.{List}) more intuitive to use, the resolveFields option has been deprecated in favor of two new methods:

    (1) You can specify a string of fields to return with the new query option, when you want to query for resolved field values (including querying relationships and virtual fields). This replaces the resolveFields: false use case.

    For example, to query a Post you would now write:

    const [post] = await context.lists.Post.findMany({
      where: { slug },
      query: `
        title
        content
        image {
          src
          width
          height
        }`,
    });

    (2) Alternatively, there is a new set of APIs on context.db.lists.{List} which will return the unresolved item data from the database (but with read hooks applied), which can then be referenced directly or returned from a custom mutation or query in the GraphQL API to be handled by the Field resolvers. This replaces the resolveFields: boolean use case.

    For example, to query for the raw data stored in the database, you would write:

    const [post] = await context.db.lists.Post.findMany({
      where: { slug },
    });
  • #5467 7498fcabb Thanks @timleslie! - Removed the deprecated context.executeGraphQL. Identical functionality is available via context.graphql.raw.

  • #5471 838247cc0 Thanks @raveling! - Fixed typo in guide meta title.

  • #5366 115b06130 Thanks @renovate! - Updated Next.js dependency to ^10.1.3.

  • Updated dependencies [fe55e9289, a5627304b, 1d85d7ff4, 43a0f5429, d7e8cad4f, ecf07393a, 8eebf9195]:

    • @keystone-next/fields-document@5.0.0
    • @keystone-ui/button@4.0.0
    • @keystone-ui/fields@3.0.0
    • @keystone-ui/icons@3.0.0
    • @keystone-ui/notice@3.0.0
    • @keystone-ui/toast@3.0.0
    • @keystone-ui/tooltip@3.0.0

@keystone-next/example-auth@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/app-basic@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/example-ecommerce@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/example-next-lite@2.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/example-roles@3.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/example-sandbox@2.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystone-next/example-todo@2.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

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

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

  • #5451 9e060fe83 Thanks @JedWatson! - With the goal of making the Lists API (i.e context.lists.{List}) more intuitive to use, the resolveFields option has been deprecated in favor of two new methods:

    (1) You can specify a string of fields to return with the new query option, when you want to query for resolved field values (including querying relationships and virtual fields). This replaces the resolveFields: false use case.

    For example, to query a Post you would now write:

    const [post] = await context.lists.Post.findMany({
      where: { slug },
      query: `
        title
        content
        image {
          src
          width
          height
        }`,
    });

    (2) Alternatively, there is a new set of APIs on context.db.lists.{List} which will return the unresolved item data from the database (but with read hooks applied), which can then be referenced directly or returned from a custom mutation or query in the GraphQL API to be handled by the Field resolvers. This replaces the resolveFields: boolean use case.

    For example, to query for the raw data stored in the database, you would write:

    const [post] = await context.db.lists.Post.findMany({
      where: { slug },
    });
  • #5400 d7e8cad4f Thanks @timleslie! - Moved the Implementation base class from the fields-legacy package into the fields package.

  • Updated dependencies [9e060fe83, b0db0a7a8, 7498fcabb, 11f5bb631, d0adec53f, 5f2673704, a5627304b, ea708559f, 406acca51, 1d85d7ff4, 0e74d8123, 5106e4bbe, be60812f2]:

    • @keystone-next/types@17.0.0
    • @keystone-next/utils-legacy@9.0.0
    • @keystone-next/test-utils-legacy@17.0.0

@keystone-next/benchmarks-legacy@6.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

@keystonejs/examples-smoke-tests@1.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

keystone-next-app@0.0.6

Patch Changes

Don't miss a new keystone release

NewReleases is sending notifications on new releases.