diff --git a/src/language/printer.js b/src/language/printer.js index 8665fee20b5..ade5cdcce68 100644 --- a/src/language/printer.js +++ b/src/language/printer.js @@ -184,7 +184,7 @@ const printDocASTReducer: any = { 'union', name, join(directives, ' '), - types && types.length !== 0 ? '= ' + join(types, ' | ') : '', + wrap('= ', join(types, ' | ')), ], ' ', ), @@ -253,7 +253,7 @@ const printDocASTReducer: any = { 'extend union', name, join(directives, ' '), - types && types.length !== 0 ? '= ' + join(types, ' | ') : '', + wrap('= ', join(types, ' | ')), ], ' ', ),