Skip to content

Commit

Permalink
refactor: Small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
unlight committed Apr 11, 2021
1 parent c9ae9e9 commit 8c311be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/input-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function inputType(
};
const modelName = getModelName(inputType.name) || '';
const model = models.get(modelName);
const modelFieldSettings = model && fieldSettings.get(model.name);

importDeclarations
.set('Field', {
Expand All @@ -66,7 +67,7 @@ export function inputType(
const { isList, location, type } = graphqlInputType;
const typeName = String(type);
const customType = config.types[typeName];
const settings = model && fieldSettings.get(model.name)?.get(field.name);
const settings = modelFieldSettings?.get(field.name);

const propertyType = getPropertyType({
location,
Expand Down

0 comments on commit 8c311be

Please sign in to comment.