Skip to content

Commit

Permalink
Remove context.graphql.createContext (#4839)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Feb 15, 2021
1 parent 556c1f9 commit 0f86e99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/unlucky-dragons-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystone-next/keystone': major
'@keystone-next/types': major
---

Removed `context.graphql.createContext` from `KeystoneContext`.
7 changes: 1 addition & 6 deletions packages-next/keystone/src/lib/createContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ export function makeCreateContext({
knex: keystone.adapter.knex,
mongoose: keystone.adapter.mongoose,
prisma: keystone.adapter.prisma,
graphql: {
createContext,
raw: rawGraphQL,
run: runGraphQL,
schema: graphQLSchema,
} as KeystoneGraphQLAPI<any>,
graphql: { raw: rawGraphQL, run: runGraphQL, schema: graphQLSchema },
maxTotalResults: keystone.queryLimits.maxTotalResults,
sudo: () => createContext({ sessionContext, skipAccessControl: true, req }),
exitSudo: () => createContext({ sessionContext, skipAccessControl: false, req }),
Expand Down
1 change: 0 additions & 1 deletion packages-next/types/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export type KeystoneGraphQLAPI<
// eslint-disable-next-line @typescript-eslint/no-unused-vars
KeystoneListsTypeInfo extends Record<string, BaseGeneratedListTypes>
> = {
createContext: CreateContext;
schema: GraphQLSchema;

run: (args: GraphQLExecutionArguments) => Promise<Record<string, any>>;
Expand Down

1 comment on commit 0f86e99

@vercel
Copy link

@vercel vercel bot commented on 0f86e99 Feb 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.