Skip to content

Releases: keystonejs/keystone

✨ 30th June 2021

30 Jun 07:28
bb8e11d
Compare
Choose a tag to compare

What's New

We've fixed an issue with cloudinaryImage and relationship fields. 🔥

"@keystone-next/auth": "28.0.1",
"@keystone-next/cloudinary": "6.0.3",
"@keystone-next/fields": "11.0.3",
"@keystone-next/keystone": "21.0.2",
"@keystone-next/session-store-redis": "3.0.1",
"@keystone-next/types": "21.0.1",

Field Options Hotfix 🔥

We've discovered an issue where cloudinaryImage and relationship fields were not passing through access control, hooks, ui and graphql options to Keystone, this is now resolved!

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/auth@28.0.1

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2
    • @keystone-next/types@21.0.1

@keystone-next/cloudinary@6.0.3

Patch Changes

  • #6031 0988f08c2 Thanks @mitchellhamilton! - Fixed cloudinaryImage field not passing through access control, hooks, ui and graphql options to Keystone.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/types@21.0.1

@keystone-next/fields@11.0.3

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • #6031 0988f08c2 Thanks @mitchellhamilton! - Fixed relationship field not passing through access control, hooks, ui and graphql options to Keystone.

  • Updated dependencies [038cd09a2]:

    • @keystone-next/keystone@21.0.2
    • @keystone-next/types@21.0.1

@keystone-next/keystone@21.0.2

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/types@21.0.1

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

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

@keystone-next/types@21.0.1

Patch Changes

@keystone-next/website@3.1.2

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

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

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2

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

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2

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

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2

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

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2

@keystone-next/example-testing@0.0.3

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/auth@28.0.1
    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2
    • @keystone-next/types@21.0.1

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

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/auth@28.0.1
    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2

✨ 29th June 2021

29 Jun 07:25
020e210
Compare
Choose a tag to compare

What's New

The ID Field option has been revamped with cuid, uuid and autoincrement options! 🤹

"@keystone-next/admin-ui-utils": "5.0.3",
"@keystone-next/auth": "28.0.0",
"@keystone-next/cloudinary@": "6.0.2",
"@keystone-next/fields": "11.0.2",
"@keystone-next/fields-document": "7.0.1",
"@keystone-next/keystone": "21.0.1",
"@keystone-next/testing": "1.0.1",
"@keystone-next/types": "21.0.0",
"@keystone-next/utils": "1.0.1",

New ID Fields 🧮

We've replaced the idField list configuration option with a more constrained option, db.idField.

This option accepts an object with a kind property with a value of:

  • cuid
  • uuid
  • autoincrement

The default behaviour has changed from using autoincrement to using cuids.

To keep the current behaviour, you should set { kind: 'autoincrement' } at db.idField in your top level config.

db.idField can be set on either the top level config object:

config({
  db: {
    idField: { kind: 'uuid' }
  },
  lists,
});

Or on individual lists:

config({
  db,
  lists: createSchema({
    User: list({
      db: {
        idField: { kind: 'uuid' },
      },
      fields: {
        name: text({ isRequired: true }),
      },
    }),
});

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/keystone@21.0.1

Major Changes

  • #5947 03f535ba6 Thanks @mitchellhamilton! - Replaced the idField list configuration option with a more constrained option, db.idField, that accepts an object with a kind property with a value of cuid, uuid or autoincrement. db.idField can be set on either the top level config object, or on individual lists.

    The default behaviour has changed from using autoincrement to using cuids. To keep the current behaviour, you should set { kind: 'autoincrement' } at db.idField in your top level config.

  • #5947 03f535ba6 Thanks @mitchellhamilton! - Id field filters no longer allow null to be passed because ids can never be null. For the in and not_in, this is reflected in the GraphQL types

  • #6022 475307e0e Thanks @mitchellhamilton! - Fixed error when loading the Admin UI due to the id field changes.

Patch Changes

  • Updated dependencies [03f535ba6]:
    • @keystone-next/types@21.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/admin-ui-utils@5.0.3
    • @keystone-next/utils@1.0.1

@keystone-next/types@21.0.0

Major Changes

  • #5947 03f535ba6 Thanks @mitchellhamilton! - Replaced the idField list configuration option with a more constrained option, db.idField, that accepts an object with a kind property with a value of cuid, uuid or autoincrement. db.idField can be set on either the top level config object, or on individual lists.

    The default behaviour has changed from using autoincrement to using cuids. To keep the current behaviour, you should set { kind: 'autoincrement' } at db.idField in your top level config.

Patch Changes

  • Updated dependencies []:
    • @keystone-next/fields@11.0.2

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

Patch Changes

  • Updated dependencies [03f535ba6]:
    • @keystone-next/types@21.0.0

@keystone-next/auth@28.0.0

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/types@21.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/admin-ui-utils@5.0.3

@keystone-next/cloudinary@6.0.2

Patch Changes

  • Updated dependencies [03f535ba6]:
    • @keystone-next/types@21.0.0
    • @keystone-next/fields@11.0.2

@keystone-next/fields@11.0.2

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/types@21.0.0
    • @keystone-next/admin-ui-utils@5.0.3
    • @keystone-next/utils@1.0.1

@keystone-next/fields-document@7.0.1

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/types@21.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/admin-ui-utils@5.0.3

@keystone-next/testing@1.0.1

Patch Changes

@keystone-next/utils@1.0.1

Patch Changes

  • Updated dependencies [03f535ba6]:
    • @keystone-next/types@21.0.0

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

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/fields@11.0.2

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

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/fields@11.0.2

@keystone-next/example-auth@4.0.3

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/auth@28.0.0
    • @keystone-next/fields@11.0.2

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

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/types@21.0.0
    • @keystone-next/auth@28.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/fields-document@7.0.1

@keystone-next/example-ecommerce@4.0.4

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/types@21.0.0
    • @keystone-next/auth@28.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/cloudinary@6.0.2

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

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/fields@11.0.2

keystone-next-app@1.0.3

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/auth@28.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/fields-document@7.0.1

@keystone-next/example-playground@1.0.2

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/fields@...
Read more

✨ 28th June 2021

28 Jun 06:12
235459e
Compare
Choose a tag to compare

What's New

An assortment of good things in this release! A new package to help test the behaviour of your GraphQL API, a document field example, better error messages, accessibility updates and another Prisma update! 🍱

"@keystone-ui/fields": "4.1.2",
"@keystone-ui/options": "4.0.1",
"@keystone-ui/pill": "5.0.0",
"@keystone-ui/popover": "4.0.2",
"@keystone-ui/toast": "4.0.1",
"@keystone-next/cloudinary": "6.0.1",
"@keystone-next/fields": "11.0.1",
"@keystone-next/keystone": "20.0.1",
"@keystone-next/testing": "1.0.0",
"@keystone-next/types": "20.0.1",
"@keystone-next/utils": "1.0.0",

Testing Package 🧪

We’ve shipped a new package called @keystone-next/testing to help you write tests for your GraphQL API!

Check out the guide on the Keystone website for more details.

Document Field Example ✍️

We have a new example project for the document field which covers the basic use case of configuring the toolbar, rendering the document field in a front end, and providing custom renderers for the built in data.

Another example showing advanced use cases is in-progress and will be available soon!

Error Messages ❗

GraphQL error messages are far more helpful when running queries. You will now get relevant error messages instead of getting Cannot assign to read only property 'path' of object '#<Object>'" back.

Thanks @tjbp for contributing this fix!

Improved Types for KeystoneContext 📜

⚠️ We've tweaked lists and db.lists APIs on KeystoneContext to have improved types. If you're using the generated KeystoneListsTypeInfo type like this:

const lists: KeystoneListsAPI<KeystoneListsTypeInfo> = context.lists;

You will have to change it to use as like this:

const lists = context.lists as KeystoneListsAPI<KeystoneListsTypeInfo>;

UI Accessibility 🏷️

Another set of accessibility improvements in the Admin UI in this release including assorted quality of life and screen reader improvements to Filter pills and dialogs, as well as labels and descriptions.

Prisma update ⬆️

We've updated our Prisma dependencies to 2.25.0, check out the Prisma releases page for more information.

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-ui/pill@5.0.0

Major Changes

  • #5987 972e04514 Thanks @gwyneplaine! - Added containerProps prop, these are spread onto the containing element. All other props are now spread onto the internal PillButton component (this change is inclusive of refs).

@keystone-next/testing@1.0.0

Major Changes

Patch Changes

@keystone-next/utils@1.0.0

Major Changes

Patch Changes

@keystone-ui/fields@4.1.2

Patch Changes

@keystone-ui/options@4.0.1

Patch Changes

@keystone-ui/popover@4.0.2

Patch Changes

@keystone-ui/toast@4.0.1

Patch Changes

@keystone-next/cloudinary@6.0.1

Patch Changes

@keystone-next/fields@11.0.1

Patch Changes

Read more

✨ 15th June 2021

15 Jun 05:32
f4193c1
Compare
Choose a tag to compare

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.

"@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 building 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 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 for more information.

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/auth@27.0.0

Major Changes

  • #5665 a3b07ea16 Thanks @mitchellhamilton! - 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 for inspiration on how to do this.

  • #5665 a3b07ea16 Thanks @mitchellhamilton! - The way that the implementations of generateHash and compare are passed from the password field to auth has changed to be in the extensions object of the GraphQL output field. Unless you've written your own password field implementation or you're using mismatching versions of @keystone-next/auth and @keystone-next/fields, this won't affect you.

Patch Changes

@keystone-next/cloudinary@6.0.0

Major Changes

  • #5665 a3b07ea16 Thanks @mitchellhamilton! - 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 for inspiration on how to do this.

Patch Changes

Read more

✨ 2nd June 2021

02 Jun 05:44
38de10a
Compare
Choose a tag to compare

What's New

We have a new JSON field ✨, a bunch of new learning resources, and plenty of under the hood optimisations in this big release. 💪

JSON Field 👩🏻‍💻

Thanks to the new json field, you can now represent JSON blobs in your backend. Check out the JSON example project to learn more.

Package: list({
  fields: {
    pkgjson: json({ isRequired: true }),
    isPrivate: checkbox(),
    ownedBy: relationship({ ref: 'Person.packages', many: false }),
  },
}),

More Learning Resources 🧑‍🏫

In addition to the JSON one above, we added new examples for:

We also published a tutorial that shows you how to embed Keystone and SQLite in a Next.js app. The end result is an app with a queryable GraphQL endpoint based on your Keystone schema that you can run live on Vercel – for free! 🚀

sortBy deprecated with improvements to orderBy 🤹‍♂️

We deprecated the sortBy GraphQL filter and updated the orderBy GraphQL filter with an improved API.

Previously a User list's allUsers query would have the argument:

orderBy: String

The new API gives it the argument:

orderBy: [UserOrderByInput!]! = []

where

input UserOrderByInput {
  id: OrderDirection
  name: OrderDirection
  score: OrderDirection
}

enum OrderDirection {
  asc
  desc
}

Rather than writing allUsers(orderBy: "name_ASC") you now write allUsers(orderBy: { name: asc }). You can also order by multiple fields, e.g. allUsers(orderBy: [{ score: asc }, { name: asc }]).

Note: each UserOrderByInput must have exactly one key, or else an error will be returned.

withItemData replaced with sessionData 🔧

We removed withItemData in favour of a sessionData option to the createAuth() function.

Previously, withItemData would be used to wrap the config.session argument:

import { config, createSchema, list } from '@keystone-next/keystone/schema';
import { statelessSessions, withAuthData } from '@keystone-next/keystone/session';
import { text, password, checkbox } from '@keystone-next/fields';
import { createAuth } from '@keystone-next/auth';

const { withAuth } = createAuth({
  listKey: 'User',
  identityField: 'email',
  secretField: 'password',
});

const session = statelessSessions({ secret: '-- EXAMPLE COOKIE SECRET; CHANGE ME --' });

export default withAuth(
  config({
    lists: createSchema({

        fields: {
          email: text({ isUnique: true }),
          password: password(),
          isAdmin: checkbox(),
        },
      }),
      session: withItemData(session, { User: 'id isAdmin' }),
    }),
  })
);

Now, the fields to populate are configured on sessionData in createAuth, and withItemData is completely removed. 🧹

import { config, createSchema, list } from '@keystone-next/keystone/schema';
import { statelessSessions } from '@keystone-next/keystone/session';
import { text, password, checkbox } from '@keystone-next/fields';
import { createAuth } from '@keystone-next/auth';

const { withAuth } = createAuth({
  listKey: 'User',
  identityField: 'email',
  secretField: 'password',
  sessionData: 'id isAdmin',
});

const session = statelessSessions({ secret: '-- EXAMPLE COOKIE SECRET; CHANGE ME --' });

export default withAuth(
  config({
    lists: createSchema({

        fields: {
          email: text({ isUnique: true }),
          password: password(),
          isAdmin: checkbox(),
        },
      }),
      session,
    }),
  })
);

More consistent and predictable createItems, updateItems, and deleteItems mutations 🧘‍♀️

We fixed the behaviour of createItems, updateItems, and deleteItems mutations to be consistent and predictable.

Previously, these mutations could return items in an arbitrary order. They now return items in the same order they were provided to the mutation.

Previously, if there was an error (e.g. validation) on one or more of the items – the return value would be null and a single top level error would be returned. The state of the database in this case was non-deterministic.

The new behaviour is to return values for all items created, with null values for those that had errors. These errors are returned in the errors array and have paths which correctly point to the null values in the returned array. All the valid operations will be completed, leaving the database in a deterministic state.

Previously, if items were filtered out by declarative access control, then no error would be returned, and only those accessible items would be returned. Now the returned data will contain null values for those items which couldn't accessed, and the errors array will contain errors with paths which correctly point to the null values in the returned array.

Previously, if static access control denied access to the mutation, then null was returned, and a single error was returned. Now, an array of nulls is returned, with a separate error for each object. This makes the behaviour of static and declarative access control consistent.

Counts Improved 🔢

The GraphQL field _all<path>Meta { count } generated for many relationships has been deprecated in favour of a new field <path>Count, which directly returns the count.

A posts relationship field would have the following field added to the API:

postsCount(where: PostWhereInput! = {}): Int

Prisma updated to 2.24.0 ⬆️

We've updated our Prisma dependency from 2.22.1 to 2.24.0! Check out the Prisma release notes for more details.

Credits 🎉

  • Thanks @jonowu for adding a sameSite option to the session options for cookies. Can be one of true, false, 'strict', 'lax' or 'none' as per Mozilla docs. See the PR for more details!

  • Thanks @gabrielkuettel for fixing a typo Database Items API page!

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/auth@26.0.0

Major Changes

  • #5806 0eadba2ba Thanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - Removed withItemData in favour of a sessionData option to the createAuth() function.

    Previously, withItemData would be used to wrap the config.session argument:

    import { config, createSchema, list } from '@keystone-next/keystone/schema';
    import { statelessSessions, withAuthData } from '@keystone-next/keystone/session';
    import { text, password, checkbox } from '@keystone-next/fields';
    import { createAuth } from '@keystone-next/auth';
    
    const { withAuth } = createAuth({
      listKey: 'User',
      identityField: 'email',
      secretField: 'password',
    });
    
    const session = statelessSessions({ secret: '-- EXAMPLE COOKIE SECRET; CHANGE ME --' });
    
    export default withAuth(
      config({
        lists: createSchema({
    
            fields: {
              email: text({ isUnique: true }),
              password: password(),
              isAdmin: checkbox(),
            },
          }),
          session: withItemData(session, { User: 'id isAdmin' }),
        }),
      })
    );

    Now, the fields to populate are configured on sessionData in createAuth, and withItemData is completely removed.

    import { config, createSchema, list } from '@keystone-next/keystone/schema';
    import { statelessSessions } from '@keystone-next/keystone/session';
    import { text, password, checkbox } from '@keystone-next/fields';
    import { createAuth } from '@keystone-next/auth';
    
    const { withAuth } = createAuth({
      listKey: 'User',
      identityField: 'email',
      secretField: 'password',
      sessionData: 'id isAdmin',
    });
    
    const session = statelessSessions({ secret: '-- EXAMPLE COOKIE SECRET; CHANGE ME --' });
    
    export default withAuth(
      config({
        lists: createSchema({
    
            fields: {
              email: text({ isUnique: true }),
              password: password(),
              isAdmin: checkbox(),
            },
          }),
          session,
        }),
      })
    );
  • #5787 bb4f4ac91 Thanks @timleslie! - Replaced req, session, createContext args to config.ui.pageMiddleware with a context arg.

Patch Changes

Read more

✨ 19th May 2021

19 May 05:42
b464668
Compare
Choose a tag to compare

What's New

Node updates 🚀

Node.JS engines in our packages have been updated to 12.x and 14.x to keep up to date with the latest versions of our dependencies.

Admin UI package moved 🚚

@keystone-next/admin-ui now lives inside @keystone-next/keystone/admin-ui.

If you were directly importing from @keystone-next/admin-ui you can now import the same items from @keystone-next/keystone/admin-ui.

⚠️ Please remove references to @keystone-next/admin-ui in your package.json files.

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-ui/button@5.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-ui/icons@4.0.0
    • @keystone-ui/loading@4.0.0

@keystone-ui/core@3.0.0

Major Changes

@keystone-ui/fields@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-ui/icons@4.0.0
    • @keystone-ui/popover@4.0.0

@keystone-ui/icons@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0

@keystone-ui/loading@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0

@keystone-ui/modals@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/button@5.0.0
    • @keystone-ui/core@3.0.0

@keystone-ui/notice@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/button@5.0.0
    • @keystone-ui/core@3.0.0
    • @keystone-ui/icons@4.0.0

@keystone-ui/options@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-ui/fields@4.0.0
    • @keystone-ui/icons@4.0.0

@keystone-ui/pill@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-ui/icons@4.0.0

@keystone-ui/popover@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0

@keystone-ui/segmented-control@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0

@keystone-ui/toast@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-ui/icons@4.0.0

@keystone-ui/tooltip@4.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-ui/popover@4.0.0

@keystone-next/admin-ui@15.0.0

Major Changes

  • #5677 e2232a553 Thanks @timleslie! - Consolidated the @keystone-next/admin-ui package into @keystone-next/keystone.

    If you were directly importing from @keystone-next/admin-ui you can now import the same items from @keystone-next/keystone/admin-ui.
    If you have @keystone-next/admin-ui in your package.json you should remove it.

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

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc]:
    • @keystone-ui/core@3.0.0
    • @keystone-next/types@18.0.0

@keystone-next/auth@25.0.0

Major Changes

  • #5746 19750d2dc Thanks @timleslie! - Update Node.js dependency to ^12.20 || >= 14.13.

  • #5677 e2232a553 Thanks @timleslie! - Consolidated the @keystone-next/admin-ui package into @keystone-next/keystone.

    If you were directly importing from @keystone-next/admin-ui you can now import the same items from @keystone-next/keystone/admin-ui.
    If you have @keystone-next/admin-ui in your package.json you should remove it.

Patch Changes

Read more

✨ 17th May 2021

17 May 02:26
fe6000e
Compare
Choose a tag to compare

What's New

Apollo cache hinting can now be configured on a per list or field basis — which can dramatically improve your applications performance 🔥.

Implementing basic authentication? We've got another example using withAuth from the auth package to get you started 🔒.

Focus control is now handled better in the Keystone UI, see the PR for the before and after 👀!

Thanks to @cameronbraid for spotting a session issue and resolving it 🐛.

Enjoying Keystone?

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


View verbose release notes

Releases

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

Major Changes

  • #5694 b1baeaba1 Thanks @timleslie! - The Setup type, returned by setupFromConfig and passed into test functions in multiAdapterRunners now has connect and disconnect functions, rather than a keystone object.

Patch Changes

@keystone-ui/popover@3.1.0

Minor Changes

  • #5670 669f0d8ac Thanks @gwyneplaine! - Added focustrap to the PopoverDialog component, when the PopoverDialog is open, browser focus is now trapped within it till the dialog is closed.

@keystone-next/keystone@17.2.0

Minor Changes

Patch Changes

@keystone-next/types@17.1.0

Minor Changes

Patch Changes

@keystone-next/admin-ui@14.1.3

Patch Changes

@keystone-next/auth@24.0.0

Patch Changes

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

Major Changes

Patch Changes

@keystone-next/example-auth@3.0.3

Patch Changes

@keystone-next/app-basic@3.0.4

Patch Changes

@keystone-next/example-ecommerce@3.0.3

Patch Changes

keystone-next-app@0.0.9

Patch Changes

  • Updated dependencies [[737b3e6e5](h...
Read more

✨ 11th May 2021

13 May 00:08
984e406
Compare
Choose a tag to compare

What's New

A bunch of admin UI tweaks in this release 🖥️, among other minor fixes. We also have the initial stages of a new blog example and a sweet new admin UI logo.

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/fields@8.2.0

Minor Changes

Patch Changes

@keystone-ui/core@2.0.3

Patch Changes

  • #5642 dbe831976 Thanks @malitov! - Added hover state to the OptionPrimitive in Admin UI and updated css colors

@keystone-ui/options@3.0.1

Patch Changes

  • #5642 dbe831976 Thanks @malitov! - Added hover state to the OptionPrimitive in Admin UI and updated css colors

  • Updated dependencies [dbe831976]:

    • @keystone-ui/core@2.0.3

@keystone-next/admin-ui@14.1.2

Patch Changes

@keystone-next/auth@23.0.1

Patch Changes

@keystone-next/fields-document@5.0.2

Patch Changes

Read more

✨ Release - 5th May 2021

12 May 03:21
cf59312
Compare
Choose a tag to compare

What's New

Aside from dependency updates 😴, we added an isIndexed config option to the text, integer, float, select, and timestamp field types.

If you look closely you’ll see the core team working on example projects to share Keystone some best-practices. Keep an eye out for those in the not too distant future 🔮.

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/fields@8.1.0

Minor Changes

  • #5616 3d3894679 Thanks @timleslie! - Added an isIndexed config option to the text, integer, float, select, and timestamp field types.

Patch Changes

  • Updated dependencies [3d3894679, 8b77b6971]:
    • @keystone-next/adapter-prisma-legacy@6.1.0
    • @keystone-next/admin-ui@14.1.1

@keystone-next/keystone@17.1.0

Minor Changes

Patch Changes

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

Minor Changes

  • #5616 3d3894679 Thanks @timleslie! - Added an isIndexed config option to the text, integer, float, select, and timestamp field types.

Patch Changes

  • Updated dependencies [3d3894679]:
    • @keystone-next/fields@8.1.0

@keystone-next/admin-ui@14.1.1

Patch Changes

@keystone-next/auth@23.0.0

Patch Changes

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

Patch Changes

@keystone-next/example-todo@3.0.0

Major Changes

  • #5591 44c1f9494 Thanks @timleslie! - Simplified the Todo application to just the basics to allow other examples to build on it.

Patch Changes

@keystone-ui/website@2.0.1

Patch Changes

@keystone-next/website@2.0.2

Patch Changes

@keystone-next/example-auth@3.0.2

Patch Changes

@keystone-next/app-basic@3.0.2

Patch Changes

@keystone-next/example-ecommerce@3.0.2

Patch Changes

Read more

✨ 3rd May 2021

12 May 03:20
3f5ee97
Compare
Choose a tag to compare

What's New

This release involved a bunch of busywork behind the scenes in Keystone Next 🔧. Stripping away all the things we don't need now that we're using Prisma exclusively. The end of the cleanup is in sight, and we're getting closer to the point where we can start working on some great new features.

Files in Keystone Next 📁. Now you can use Admin UI to upload local files to your repo using SQLite. We also added a maxFileSize property for easier project config.

Enjoying Keystone?

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


View verbose release notes

Releases

@keystone-next/fields@8.0.0

Major Changes

  • #5578 f7d4c9b9f Thanks @mitchellhamilton! - Replaced mode field on ImageFieldOutput GraphQL type with making ImageFieldOutput an interface and having a LocalImageFieldOutput type that implements ImageFieldOutput.

  • #5582 49dd46843 Thanks @gwyneplaine! - Changed image ref to now be ${mode}:image:${id}.

Minor Changes

Patch Changes

@keystone-next/keystone@17.0.0

Major Changes

Minor Changes

Patch Changes

@keystone-next/utils-legacy@10.0.0

Major Changes

Minor Changes

Read more