Skip to content

Commit

Permalink
only import inflection.classify
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Sep 26, 2023
1 parent b0022bd commit 73b83ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/fields/types/multiselect/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import { classify } from 'inflection';
import { humanize } from '../../../lib/utils';
import {
BaseListTypeInfo,
Expand Down Expand Up @@ -170,7 +170,7 @@ function configToOptionsAndGraphQLType(
});

if (config.type === 'enum') {
const enumName = `${meta.listKey}${inflection.classify(meta.fieldKey)}Type`;
const enumName = `${meta.listKey}${classify(meta.fieldKey)}Type`;
const graphqlType = graphql.enum({
name: enumName,
values: graphql.enumValues(options.map(x => x.value)),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/fields/types/select/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import { classify } from 'inflection';
import { humanize } from '../../../lib/utils';
import {
BaseListTypeInfo,
Expand Down Expand Up @@ -176,7 +176,7 @@ export const select =
});

if (config.type === 'enum') {
const enumName = `${meta.listKey}${inflection.classify(meta.fieldKey)}Type`;
const enumName = `${meta.listKey}${classify(meta.fieldKey)}Type`;
const graphQLType = graphql.enum({
name: enumName,
values: graphql.enumValues(options.map(x => x.value)),
Expand Down

0 comments on commit 73b83ee

Please sign in to comment.