Skip to content

Commit

Permalink
Fix KeystoneContext type exported from .keystone/types (#6711)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown authored Oct 5, 2021
1 parent 393c2bd commit 1a06143
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-gifts-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone': patch
---

Fix `KeystoneContext` type exported from `.keystone/types`
6 changes: 3 additions & 3 deletions packages/keystone/src/lib/schema-type-printer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ export type ${listKey}ListFn = (
export type KeystoneListsAPI = GenericKeystoneListsAPI<KeystoneListsTypeInfo>;
export type KeystoneDbAPI = GenericKeystoneDbAPI<KeystoneListsTypeInfo>;
export type KeystoneContext = Omit<GenericKeystoneContext, 'db' | 'lists' | 'prisma'> & {
db: { lists: KeystoneDbAPI };
lists: KeystoneListsAPI;
export type KeystoneContext = Omit<GenericKeystoneContext, 'db' | 'query' | 'prisma'> & {
db: KeystoneDbAPI;
query: KeystoneListsAPI;
prisma: import('.prisma/client').PrismaClient;
};
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ export type KeystoneDbAPI = GenericKeystoneDbAPI<KeystoneListsTypeInfo>;
export type KeystoneContext = Omit<
GenericKeystoneContext,
'db' | 'lists' | 'prisma'
'db' | 'query' | 'prisma'
> & {
db: { lists: KeystoneDbAPI };
lists: KeystoneListsAPI;
db: KeystoneDbAPI;
query: KeystoneListsAPI;
prisma: import('.prisma/client').PrismaClient;
};
Expand Down

0 comments on commit 1a06143

Please sign in to comment.