chore: rename buildInputObject to withWhereAndOr

This commit is contained in:
Dan Ribbens
2022-02-11 13:45:27 -05:00
parent 26b13a81c3
commit 407bc35a31
3 changed files with 6 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ import { GraphQLJSON } from 'graphql-type-json';
import formatName from '../utilities/formatName';
import withOperators from './withOperators';
import { FieldAffectingData } from '../../fields/config/types';
import buildInputObject from './buildInputObject';
import withWhereAndOr from './withWhereAndOr';
import operators from './operators';
import { SanitizedCollectionConfig } from '../../collections/config/types';
import recursivelyBuildNestedPaths from './recursivelyBuildNestedPaths';
@@ -41,7 +41,7 @@ const buildVersionWhereInputType = (singularLabel: string, parentCollection: San
fieldTypes[versionField.key] = versionField.type;
});
return buildInputObject(name, fieldTypes);
return withWhereAndOr(name, fieldTypes);
};
export default buildVersionWhereInputType;

View File

@@ -15,7 +15,7 @@ import {
import formatName from '../utilities/formatName';
import withOperators from './withOperators';
import operators from './operators';
import buildInputObject from './buildInputObject';
import withWhereAndOr from './withWhereAndOr';
import fieldToSchemaMap from './fieldToSchemaMap';
// buildWhereInputType is similar to buildObjectType and operates
@@ -67,7 +67,7 @@ const buildWhereInputType = (name: string, fields: Field[], parentName: string):
const fieldName = formatName(name);
return buildInputObject(fieldName, fieldTypes);
return withWhereAndOr(fieldName, fieldTypes);
};
export default buildWhereInputType;

View File

@@ -5,7 +5,7 @@ import {
Thunk,
} from 'graphql';
const buildInputObject = (name: string, fieldTypes: Thunk<GraphQLInputFieldConfigMap>): GraphQLInputObjectType => {
const withWhereAndOr = (name: string, fieldTypes: Thunk<GraphQLInputFieldConfigMap>): GraphQLInputObjectType => {
return new GraphQLInputObjectType({
name: `${name}_where`,
fields: {
@@ -26,4 +26,4 @@ const buildInputObject = (name: string, fieldTypes: Thunk<GraphQLInputFieldConfi
});
};
export default buildInputObject;
export default withWhereAndOr;