diff --git a/src/graphql/schema/buildWhereInputType.ts b/src/graphql/schema/buildWhereInputType.ts index aecfc6571e..2a6334d990 100644 --- a/src/graphql/schema/buildWhereInputType.ts +++ b/src/graphql/schema/buildWhereInputType.ts @@ -15,7 +15,7 @@ import { import formatName from '../utilities/formatName'; import withOperators from './withOperators'; import operators from './operators'; -import fieldToSchemaMap from './fieldToSchemaMap'; +import fieldToSchemaMap from './fieldToWhereInputSchemaMap'; // buildWhereInputType is similar to buildObjectType and operates // on a field basis with a few distinct differences. diff --git a/src/graphql/schema/fieldToSchemaMap.ts b/src/graphql/schema/fieldToWhereInputSchemaMap.ts similarity index 98% rename from src/graphql/schema/fieldToSchemaMap.ts rename to src/graphql/schema/fieldToWhereInputSchemaMap.ts index 10b9040f6e..4492f1f836 100644 --- a/src/graphql/schema/fieldToSchemaMap.ts +++ b/src/graphql/schema/fieldToWhereInputSchemaMap.ts @@ -169,12 +169,6 @@ const fieldToSchemaMap: (parentName: string) => any = (parentName: string) => ({ }); } - if (field.hasMany) { - return { - type: new GraphQLList(type), - }; - } - return { type }; }, upload: (field: UploadField) => ({ diff --git a/src/graphql/schema/recursivelyBuildNestedPaths.ts b/src/graphql/schema/recursivelyBuildNestedPaths.ts index bca906b772..68a00c0410 100644 --- a/src/graphql/schema/recursivelyBuildNestedPaths.ts +++ b/src/graphql/schema/recursivelyBuildNestedPaths.ts @@ -4,7 +4,7 @@ import { fieldIsPresentationalOnly, FieldWithSubFields, } from '../../fields/config/types'; -import fieldToSchemaMap from './fieldToSchemaMap'; +import fieldToSchemaMap from './fieldToWhereInputSchemaMap'; const recursivelyBuildNestedPaths = (parentName: string, field: FieldWithSubFields & FieldAffectingData) => { const nestedPaths = field.fields.reduce((nestedFields, nestedField) => {