chore: rename buildInputObject to withWhereAndOr
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user