Skip to content

Commit

Permalink
removes KeystoneAdminMeta from sudo GraphQL contexts (breaking)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Aug 14, 2023
1 parent 0ab61be commit 268d703
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/no-sudo-meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-6/core': major
---

Removes `KeystoneAdminMeta` from sudo GraphQL contexts, should not be used within a sudo context
5 changes: 1 addition & 4 deletions packages/core/src/lib/createSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ function getSudoGraphQLSchema(config: KeystoneConfig) {
};

const lists = initialiseLists(transformedConfig);
const adminMeta = createAdminMeta(transformedConfig, lists);
return createGraphQLSchema(transformedConfig, lists, adminMeta, true);
// TODO: adminMeta not useful for sudo, remove in breaking change
// return createGraphQLSchema(transformedConfig, lists, null, true);
return createGraphQLSchema(transformedConfig, lists, null, true);
}

function injectNewDefaults(prismaClient: any, lists: Record<string, InitialisedList>) {
Expand Down

0 comments on commit 268d703

Please sign in to comment.