Skip to content

Commit

Permalink
Expanded _ksListsMeta query input to take a key list
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed May 27, 2020
1 parent a520364 commit 769a7a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-monkeys-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/keystone': patch
---

Expanded `_ksListsMeta` query input to take a key list.
4 changes: 2 additions & 2 deletions packages/keystone/lib/providers/listCRUD.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ListCRUDProvider {
count: Int
}`,
`input ${this.gqlNames.listsMetaInput} {
key: String
key: [String]
}`,
`input _ListSchemaFieldsInput {
type: String
Expand Down Expand Up @@ -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)),
};
}
Expand Down

0 comments on commit 769a7a4

Please sign in to comment.