Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie committed Aug 10, 2021
1 parent b4b93d4 commit 8a5c22d
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/keystone/src/lib/core/mutations/create-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ async function updateSingle(
const item = await getAccessControlledItemForUpdate(
list,
context,

uniqueInput,
uniqueWhere,
rawData
Expand Down
5 changes: 1 addition & 4 deletions packages/keystone/src/lib/core/mutations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ function promisesButSettledWhenAllSettledAndInOrder<T extends Promise<unknown>[]
}) as T;
}

export function getMutationsForList(
list: InitialisedList,
provider: DatabaseProvider
) {
export function getMutationsForList(list: InitialisedList, provider: DatabaseProvider) {
const names = getGqlNames(list);

const createOne = schema.field({
Expand Down
2 changes: 1 addition & 1 deletion packages/keystone/src/lib/core/queries/output-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
} from '@keystone-next/types';
import { GraphQLResolveInfo } from 'graphql';
import { validateFieldAccessControl } from '../access-control';
import { accessDeniedError } from '../graphql-errors';
import { ResolvedDBField, ResolvedRelationDBField } from '../resolve-relationships';
import { InitialisedList } from '../types-for-lists';
import { IdType, getDBFieldKeyForFieldOnMultiField, runWithPrisma } from '../utils';
import { accessDeniedError } from '../graphql-errors';
import { accessControlledFilter } from './resolvers';
import * as queries from './resolvers';

Expand Down
2 changes: 1 addition & 1 deletion packages/keystone/src/lib/core/queries/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
resolveWhereInput,
UniqueInputFilter,
} from '../where-inputs';
import { accessDeniedError, limitsExceededError } from '../graphql-errors';
import { InitialisedList } from '../types-for-lists';
import { getDBFieldKeyForFieldOnMultiField, runWithPrisma } from '../utils';
import { accessDeniedError, limitsExceededError } from '../graphql-errors';

// doing this is a result of an optimisation to skip doing a findUnique and then a findFirst(where the second one is done with access control)
// we want to do this explicit mapping because:
Expand Down
1 change: 0 additions & 1 deletion packages/keystone/src/lib/createGraphQLSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { getDBProvider } from './createSystem';
export function createGraphQLSchema(
config: KeystoneConfig,
lists: Record<string, InitialisedList>,

adminMeta: AdminMetaRootVal
) {
// Start with the core keystone graphQL schema
Expand Down
1 change: 0 additions & 1 deletion packages/keystone/src/lib/createSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function getInternalGraphQLSchema(config: KeystoneConfig, provider: DatabaseProv

export function createSystem(config: KeystoneConfig) {
const provider = getDBProvider(config.db);

const lists = initialiseLists(config.lists, provider);

const adminMeta = createAdminMeta(config, lists);
Expand Down

0 comments on commit 8a5c22d

Please sign in to comment.