Skip to content

Commit

Permalink
fix for missing enum in build operation node for field method (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
brense committed Jun 23, 2020
1 parent ad03249 commit 4b20d8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/utils/src/build-operation-for-field.ts
Expand Up @@ -24,6 +24,7 @@ import {
NonNullTypeNode,
OperationTypeNode,
isInterfaceType,
isEnumType,
Kind,
} from 'graphql';
import { camelCase } from 'camel-case';
Expand Down Expand Up @@ -472,7 +473,7 @@ function resolveField({
}
fieldTypeMap.set(fieldName, field.type.toString());

if (!isScalarType(namedType)) {
if (!isScalarType(namedType) && !isEnumType(namedType)) {
return {
kind: Kind.FIELD,
name: {
Expand Down

0 comments on commit 4b20d8e

Please sign in to comment.