diff --git a/.changeset/silver-monkeys-shop.md b/.changeset/silver-monkeys-shop.md new file mode 100644 index 00000000000..58d7e0082c3 --- /dev/null +++ b/.changeset/silver-monkeys-shop.md @@ -0,0 +1,5 @@ +--- +'@keystonejs/keystone': patch +--- + +Expanded `_ksListsMeta` query input to take a key list. diff --git a/packages/keystone/lib/providers/listCRUD.js b/packages/keystone/lib/providers/listCRUD.js index 1cf1ffdd857..7882f367325 100644 --- a/packages/keystone/lib/providers/listCRUD.js +++ b/packages/keystone/lib/providers/listCRUD.js @@ -91,7 +91,7 @@ class ListCRUDProvider { count: Int }`, `input ${this.gqlNames.listsMetaInput} { - key: String + key: [String] }`, `input _ListSchemaFieldsInput { type: String @@ -193,7 +193,7 @@ class ListCRUDProvider { // And the Keystone meta queries must always be available [this.gqlNames.listsMeta]: (_, { where: { key } = {} }, context) => this.lists - .filter(list => list.access[schemaName].read && (!key || list.key === key)) + .filter(list => list.access[schemaName].read && (!key || key.includes(list.key))) .map(list => list.listMeta(context)), }; }