diff --git a/src/utils.js b/src/utils.js index 5e2e24ce..ff438d5d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -798,7 +798,7 @@ export const extractTypeMapFromTypeDefs = typeDefs => { // into a single string for parse, add validatation const astNodes = parse(typeDefs).definitions; return astNodes.reduce((acc, t) => { - acc[t.name.value] = t; + if (t.name) acc[t.name.value] = t; return acc; }, {}); };