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:
- Setting Default Values for fields.
- Extending the GraphQL Schema with custom queries and mutations.
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: StringThe 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! = {}): IntPrisma 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
sameSiteoption 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
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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
bb4f4ac91Thanks @timleslie! - Replacedreq, session, createContextargs toconfig.ui.pageMiddlewarewith acontextarg.
Patch Changes
-
#5766
a2553ab82Thanks @gwyneplaine! - Added visually hidden labels to signin / welcome fields for better screen reader experience. -
#5827
a0ef39cb3Thanks @timleslie! - Updated schema extension code to not depend on theBaseKeystoneobject. -
#5828
4b11c5ea8Thanks @timleslie! - Removed thekeystoneargument from theExtendGraphqlSchematype. This will only impact you if you were directly constructing this function. Users of thegraphQLSchemaExtensionfunction will not be impacted. -
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,5cc35170f,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,3a7acc2c5,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-ui/fields@4.1.0
- @keystone-next/admin-ui-utils@5.0.1
@keystone-next/fields@10.0.0
Major Changes
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
Minor Changes
- #5779
59421c039Thanks @gwyneplaine! - Addedjsonfield.
Patch Changes
-
#5815
b9c828fb0Thanks @timleslie! - Fixed the type oforiginalInputin the argument todefaultValue. -
#5799
0617c81eaThanks @gwyneplaine! - Fixed field label element, so that it actually refers to the text input. -
#5800
590bb1fe9Thanks @gwyneplaine! - Fixed text, decimal, float and integer field labels. Labels are now associated with inputs via the field.path attribute. -
#5764
19a756496Thanks @bladey! - Adjusted fields GqlAuxQueries function to return any type to prevent build errors. -
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,29075e580,5cc35170f,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,02af04c03,107eeb037,3a7acc2c5,9de71a9fb,08478b8a7,7bda87ea7,4b11c5ea8,38a177d61,bb4f4ac91]:- @keystone-next/keystone@19.0.0
- @keystone-next/types@19.0.0
- @keystone-next/adapter-prisma-legacy@8.0.0
- @keystone-ui/fields@4.1.0
- @keystone-next/admin-ui-utils@5.0.1
- @keystone-next/utils-legacy@11.0.1
@keystone-next/keystone@19.0.0
Major Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5772
f52079f0bThanks @timleslie! - Fixed the behaviour ofcreateItems,updateItems, anddeleteItemsmutations 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, say a validation error, on one or more of the items then the return value would be
nulland 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
nullvalues for those that had errors. These errors are returned in theerrorsarray and have paths which correctly point to thenullvalues 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
nullvalues for those items which couldn't accessed, and theerrorsarray will contain errors with paths which correctly point to thenullvalues in the returned array.Previously, if static access control denied access to the mutation, then
nullwas returned, and a singleerrorwas returned. Now, an array ofnulls is returned, with a separate error for each object. This makes the behaviour of static and declarative access control consistent. -
#5777
74bc77854Thanks @timleslie! - Updated the type of theskipargument toallItemsfromInttoInt! = 0. -
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5832
195d4fb12Thanks @timleslie! - Updated the functionsgetCommittedArtifacts,validateCommittedArtifacts,generateCommittedArtifacts, andgenerateNodeModulesArtifactsexported fromartifacts.tsto accept aKeystoneConfigargument rather than aBaseKeystoneobject. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5802
7bda87ea7Thanks @timleslie! - Changedconfig.sessionto access aSessionStrategyobject, rather than a() => SessionStrategyfunction. You will only need to change your configuration if you're using a customised session strategy. -
#5828
4b11c5ea8Thanks @timleslie! - Removed thekeystoneargument from theExtendGraphqlSchematype. This will only impact you if you were directly constructing this function. Users of thegraphQLSchemaExtensionfunction will not be impacted. -
#5787
bb4f4ac91Thanks @timleslie! - Replacedreq, session, createContextargs toconfig.ui.pageMiddlewarewith acontextarg.
Minor Changes
-
#5774
107eeb037Thanks @jonowu! - AddedsameSiteoption to session options for cookies -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
Patch Changes
-
#5780
29075e580Thanks @mitchellhamilton! - Fixed schema type printer to make arguments that have default values be optional -
#5825
c6cd0a6bdThanks @timleslie! - Updated the Admin UI to use theitemsCountGraphQL API. -
#5826
1fe4753f3Thanks @timleslie! - Updated the list page of the Admin UI to useorderByrather thansortByto order items. -
#5849
76cdb791bThanks @renovate! - Updated Prisma dependencies to2.24.0. -
#5768
762f17823Thanks @timleslie! - Updatedcontext.db.listsAPI to correctly apply GraphQL defaults to query arguments. -
#5784
38a177d61Thanks @renovate! - Updated Prisma dependency to2.23.0. -
Updated dependencies [
b9c828fb0,a6a444acd,59421c039,5cc35170f,0617c81ea,02af04c03,3a7acc2c5,08478b8a7,fe5b463ed,7bda87ea7,590bb1fe9,4b11c5ea8,bb4f4ac91,19a756496]:- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-next/adapter-prisma-legacy@8.0.0
- @keystone-ui/fields@4.1.0
- @keystone-ui/popover@4.0.1
- @keystone-next/admin-ui-utils@5.0.1
- @keystone-next/utils-legacy@11.0.1
@keystone-next/types@19.0.0
Major Changes
-
#5815
b9c828fb0Thanks @timleslie! - Fixed the type oforiginalInputin the argument todefaultValue. -
#5802
7bda87ea7Thanks @timleslie! - Changedconfig.sessionto access aSessionStrategyobject, rather than a() => SessionStrategyfunction. You will only need to change your configuration if you're using a customised session strategy. -
#5828
4b11c5ea8Thanks @timleslie! - Removed thekeystoneargument from theExtendGraphqlSchematype. This will only impact you if you were directly constructing this function. Users of thegraphQLSchemaExtensionfunction will not be impacted.
Patch Changes
-
#5831
5cc35170fThanks @timleslie! - Updated the type ofKeystoneContext.gqlNamesto beGqlNamesrather than justRecord<string,string>. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
#5787
bb4f4ac91Thanks @timleslie! - Replacedreq, session, createContextargs toconfig.ui.pageMiddlewarewith acontextarg. -
Updated dependencies [
b9c828fb0,a6a444acd,59421c039,0617c81ea,02af04c03,590bb1fe9,19a756496]:- @keystone-next/fields@10.0.0
- @keystone-next/adapter-prisma-legacy@8.0.0
@keystone-next/adapter-prisma-legacy@8.0.0
Major Changes
-
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned.
Patch Changes
- Updated dependencies [
b9c828fb0,a6a444acd,59421c039,5cc35170f,0617c81ea,02af04c03,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,bb4f4ac91,19a756496]:- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-next/utils-legacy@11.0.1
@keystone-next/test-utils-legacy@20.0.0
Major Changes
- #5832
195d4fb12Thanks @timleslie! - Updated the functionsgetCommittedArtifacts,validateCommittedArtifacts,generateCommittedArtifacts, andgenerateNodeModulesArtifactsexported fromartifacts.tsto accept aKeystoneConfigargument rather than aBaseKeystoneobject.
Patch Changes
- Updated dependencies [
0eadba2ba,f52079f0b,74bc77854,29075e580,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,02af04c03,107eeb037,9de71a9fb,08478b8a7,7bda87ea7,4b11c5ea8,38a177d61,bb4f4ac91]:- @keystone-next/keystone@19.0.0
- @keystone-next/adapter-prisma-legacy@8.0.0
@keystone-ui/fields@4.1.0
Minor Changes
- #5761
3a7acc2c5Thanks @gwyneplaine! - Added as prop to FieldContainer component.
Patch Changes
- Updated dependencies [
fe5b463ed]:- @keystone-ui/popover@4.0.1
@keystone-ui/popover@4.0.1
Patch Changes
- #5811
fe5b463edThanks @gwyneplaine! - Fixed popover to not be focusable or read by screen reader when not visible.
@keystone-next/admin-ui-utils@5.0.1
Patch Changes
- Updated dependencies [
b9c828fb0,5cc35170f,02af04c03,08478b8a7,7bda87ea7,4b11c5ea8,bb4f4ac91]:- @keystone-next/types@19.0.0
@keystone-next/cloudinary@5.0.1
Patch Changes
- Updated dependencies [
b9c828fb0,a6a444acd,59421c039,5cc35170f,0617c81ea,02af04c03,3a7acc2c5,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,bb4f4ac91,19a756496]:- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-next/adapter-prisma-legacy@8.0.0
- @keystone-ui/fields@4.1.0
@keystone-next/fields-document@6.0.1
Patch Changes
-
#5831
5cc35170fThanks @timleslie! - Removed reference to the deprecatedcontext.keystone. -
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,5cc35170f,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,3a7acc2c5,9de71a9fb,08478b8a7,fe5b463ed,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-next/adapter-prisma-legacy@8.0.0
- @keystone-ui/fields@4.1.0
- @keystone-ui/popover@4.0.1
- @keystone-next/admin-ui-utils@5.0.1
@keystone-next/utils-legacy@11.0.1
Patch Changes
- Updated dependencies [
b9c828fb0,5cc35170f,02af04c03,08478b8a7,7bda87ea7,4b11c5ea8,bb4f4ac91]:- @keystone-next/types@19.0.0
@keystone-next/example-default-values@1.0.0
Major Changes
- #5814
28ca49c3bThanks @timleslie! - Initial version of thedefault-valuesexample.
Patch Changes
-
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
@keystone-next/example-extend-graphql-schema@1.0.0
Major Changes
- #5820
8598c8371Thanks @timleslie! - Initial version of theextend-graphql-schemaexample.
Patch Changes
-
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
@keystone-next/website@3.1.0
Minor Changes
Patch Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5771
51aca916bThanks @raveling! - New tutorial for Keystone Lite. First draft. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5823
553bad1e7Thanks @gabrielkuettel! - Fixed a typo in the db items api sample code. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist 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
@keystone-next/example-auth@4.0.1
Patch Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,a2553ab82,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,a0ef39cb3,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/auth@26.0.0
- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
@keystone-next/app-basic@4.0.1
Patch Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,5cc35170f,a6a444acd,29075e580,a2553ab82,59421c039,5cc35170f,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,3a7acc2c5,a0ef39cb3,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/auth@26.0.0
- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-next/fields-document@6.0.1
- @keystone-ui/fields@4.1.0
@keystone-next/example-ecommerce@4.0.1
Patch Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5829
f36a70a55Thanks @timleslie! - UpdatedinsertSeedDatato directly accesscontext.prisma. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,a2553ab82,59421c039,5cc35170f,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,a0ef39cb3,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/auth@26.0.0
- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
- @keystone-next/cloudinary@5.0.1
@keystone-next/example-embedded-nextjs@3.0.1
Patch Changes
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
keystone-next-app@1.0.1
Patch Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,5cc35170f,a6a444acd,29075e580,a2553ab82,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,a0ef39cb3,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/auth@26.0.0
- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
- @keystone-next/fields-document@6.0.1
@keystone-next/example-roles@4.0.1
Patch Changes
-
#5806
0eadba2baThanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - RemovedwithItemDatain favour of asessionDataoption to thecreateAuth()function.Previously,
withItemDatawould be used to wrap theconfig.sessionargument: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
sessionDataincreateAuth, andwithItemDatais 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, }), }) );
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,a2553ab82,59421c039,5cc35170f,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,a0ef39cb3,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/auth@26.0.0
- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
- @keystone-next/types@19.0.0
@keystone-next/example-sandbox@3.0.1
Patch Changes
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,a2553ab82,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,a0ef39cb3,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/auth@26.0.0
- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
@keystone-next/example-blog@2.0.1
Patch Changes
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5792
319c19bd5Thanks @timleslie! - Changed the type of thewhereargument toallItemsto_allItemsMetafrom typeItemWhereInputtoItemWhereInput! = {}. -
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
#5767
02af04c03Thanks @timleslie! - Deprecated thesortByGraphQL filter. Updated theorderByGraphQL filter with an improved API.Previously a
Userlist'sallUsersquery 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 writeallUsers(orderBy: { name: asc }). You can also now order by multiple fields, e.g.allUsers(orderBy: [{ score: asc }, { name: asc }]). EachUserOrderByInputmust have exactly one key, or else an error will be returned. -
#5791
9de71a9fbThanks @timleslie! - Changed the return type ofallItems(...)from[User]to[User!], as this API can never havenullitems in the return array. -
#5769
08478b8a7Thanks @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
Userlist would have the following query added to the API:usersCount(where: UserWhereInput! = {}): Int
-
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61,bb4f4ac91,19a756496]:- @keystone-next/keystone@19.0.0
- @keystone-next/fields@10.0.0
@keystone-next/example-json-field@4.0.1
Patch Changes
-
#5797
a6a444acdThanks @timleslie! - The GraphQL field_all<path>Meta { count }generated formanyrelationships has been deprecated in favour of a new field<path>Count, which directly returns the count.A
postsrelationship field would have the following field added to the API:postsCount(where: PostWhereInput! = {}): Int
-
#5850
5b02e8625Thanks @timleslie! - TheANDandORoperators ofItemWhereInputnow accept non-null values, e.g.[ItemWhereInput!], rather than[ItemWhereInput]. -
Updated dependencies [
0eadba2ba,f52079f0b,b9c828fb0,74bc77854,a6a444acd,29075e580,59421c039,319c19bd5,c6cd0a6bd,195d4fb12,1fe4753f3,5b02e8625,76cdb791b,762f17823,0617c81ea,02af04c03,107eeb037,9de71a9fb,08478b8a7,7bda87ea7,590bb1fe9,4b11c5ea8,38a177d61, [bb4f4ac91](bb4f4a...