Skip to content

Latest commit

 

History

History
368 lines (242 loc) · 22.6 KB

CHANGELOG.md

File metadata and controls

368 lines (242 loc) · 22.6 KB

@keystone-next/website

3.1.5

Patch Changes

  • #6391 bc9088f05 Thanks @bladey! - Adds support for introspection in the Apollo Server config. Introspection enables you to query a GraphQL server for information about the underlying schema. If the playground is enabled then introspection is automatically enabled - unless specifically disabled.

3.1.4

Patch Changes

3.1.3

Patch Changes

3.1.2

Patch Changes

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

3.1.1

Patch Changes

  • Updated dependencies [df7d7b6f6, a3b07ea16, 8958704ec]:
    • @keystone-ui/fields@4.1.1
    • @keystone-next/fields-document@7.0.0
    • @keystone-ui/core@3.1.0

3.1.0

Minor Changes

Patch 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,
        }),
      })
    );
  • #5767 02af04c03 Thanks @timleslie! - Deprecated the sortBy GraphQL filter. 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 now order by multiple fields, e.g. allUsers(orderBy: [{ score: asc }, { name: asc }]). Each UserOrderByInput must have exactly one key, or else an error will be returned.

  • #5791 9de71a9fb Thanks @timleslie! - Changed the return type of allItems(...) from [User] to [User!], as this API can never have null items in the return array.
  • #5769 08478b8a7 Thanks @timleslie! - The GraphQL query _all<Items>Meta { count } generated for each list has been deprecated in favour of a new query <items>Count, which directy returns the count.

    A User list would have the following query added to the API:

    usersCount(where: UserWhereInput! = {}): Int
  • Updated dependencies [5cc35170f, 3a7acc2c5]:

    • @keystone-next/fields-document@6.0.1
    • @keystone-ui/fields@4.1.0

3.0.0

Major Changes

Patch Changes

  • Updated dependencies [19750d2dc, e2232a553]:
    • @keystone-ui/button@5.0.0
    • @keystone-ui/core@3.0.0
    • @keystone-ui/fields@4.0.0
    • @keystone-ui/icons@4.0.0
    • @keystone-ui/notice@4.0.0
    • @keystone-ui/toast@4.0.0
    • @keystone-ui/tooltip@4.0.0
    • @keystone-next/fields-document@6.0.0

2.0.2

Patch Changes

2.0.1

Patch Changes

  • #5544 b49befd9c Thanks @raveling! - copy changes to document-fields guide

  • Updated dependencies []:

    • @keystone-next/fields-document@5.0.1

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.

1.3.0

Minor Changes

  • #5368 b40016301 Thanks @timleslie! - The config option db.adapter is now deprecated. It has been repaced with db.provider which can take the values postgresql or sqlite.

Patch Changes

  • #5283 192393d0d Thanks @timleslie! - The flag { experimental: { prismaSqlite: true } } is no longer required to use the SQLite adapter.

  • Updated dependencies [4fa66ac1f, d93bab17b]:

    • @keystone-next/fields-document@4.0.0
    • @keystone-ui/fields@2.1.0

1.2.0

Minor Changes

  • #4912 d31acf61b Thanks @timleslie! - Added a config.graphql.apolloConfig option to allow developers to configure the ApolloServer object provided by Keystone.

Patch Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

Patch Changes

1.0.0

Major Changes

Patch Changes

  • 28c2ee5be #4811 Thanks @gwyneplaine! - Added syntax highlighting to code in mdx.

  • Updated dependencies [b97216a65]:

    • @keystone-ui/button@3.0.0
    • @keystone-ui/core@2.0.0
    • @keystone-ui/fields@2.0.0
    • @keystone-ui/notice@2.0.0
    • @keystone-ui/tooltip@2.0.0

0.1.1

Patch Changes

0.1.0

Minor Changes

Patch Changes