Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printer: use wrap util function in more places #2934

Merged
merged 1 commit into from Feb 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/language/printer.js
Expand Up @@ -180,12 +180,7 @@ const printDocASTReducer: any = {
UnionTypeDefinition: ({ description, name, directives, types }) =>
wrap('', description, '\n') +
join(
[
'union',
name,
join(directives, ' '),
types && types.length !== 0 ? '= ' + join(types, ' | ') : '',
],
['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],
' ',
),

Expand Down Expand Up @@ -253,7 +248,7 @@ const printDocASTReducer: any = {
'extend union',
name,
join(directives, ' '),
types && types.length !== 0 ? '= ' + join(types, ' | ') : '',
wrap('= ', join(types, ' | ')),
],
' ',
),
Expand Down