Skip to content

Commit

Permalink
Merge branch 'master' into remove-keystone-create-context
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Mar 28, 2021
2 parents 695c081 + fe9fc5e commit ad5c1af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-numbers-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone-legacy': major
---

Removed the legacy `schemaNames` argument from the `Keystone` and `List` constructors.
1 change: 0 additions & 1 deletion packages-next/keystone/src/lib/createKeystone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export function createKeystone(
// FIXME: Unsupported options: Need to work which of these we want to support with backwards
// compatibility options.
// defaultAccess
// schemaNames
});

Object.entries(lists).forEach(([key, { fields, graphql, access, hooks, description, db }]) => {
Expand Down
4 changes: 1 addition & 3 deletions packages/keystone/lib/Keystone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { List } = require('../ListTypes');
const { ListCRUDProvider } = require('../providers');

module.exports = class Keystone {
constructor({ defaultAccess, adapter, onConnect, queryLimits = {}, schemaNames = ['public'] }) {
constructor({ defaultAccess, adapter, onConnect, queryLimits = {} }) {
this.defaultAccess = { list: true, field: true, custom: true, ...defaultAccess };
this.auth = {};
this.lists = {};
Expand All @@ -15,7 +15,6 @@ module.exports = class Keystone {
this._schemas = {};
this.eventHandlers = { onConnect };
this.registeredTypes = new Set();
this._schemaNames = schemaNames;

this._listCRUDProvider = new ListCRUDProvider();
this._providers = [this._listCRUDProvider];
Expand Down Expand Up @@ -71,7 +70,6 @@ module.exports = class Keystone {
}
return this.createList(auxKey, auxConfig, { isAuxList: true });
},
schemaNames: this._schemaNames,
});
this.lists[key] = list;
this.listsArray.push(list);
Expand Down
4 changes: 2 additions & 2 deletions packages/keystone/lib/ListTypes/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = class List {
queryLimits = {},
cacheHint,
},
{ getListByKey, adapter, defaultAccess, registerType, createAuxList, isAuxList, schemaNames }
{ getListByKey, adapter, defaultAccess, registerType, createAuxList, isAuxList }
) {
this.key = key;
this._fields = fields;
Expand Down Expand Up @@ -115,7 +115,7 @@ module.exports = class List {

this.adapterName = adapter.name;
this.adapter = adapter.newListAdapter(this.key, adapterConfig);
this._schemaNames = schemaNames;
this._schemaNames = ['public'];

this.access = parseListAccess({
schemaNames: this._schemaNames,
Expand Down

0 comments on commit ad5c1af

Please sign in to comment.