Multi-line field descriptions printing newline #4009
Unanswered
tgomesfork
asked this question in
Q&A
Replies: 1 comment
-
|
Yeah this changed in v16 when description handling switched to using block-string serialization only when the content naturally fits. The workaround is to avoid the leading whitespace in your template literal — graphql-js trims consistent leading whitespace from each line, so if you indent the whole block the trim logic can't kick in. A tagged dedent helper (or |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Following this
type-graphqldiscussion, sincegraphql-jsv16.0.0, multi-line field descriptions do not seem to be printed correctly.Previously we were able to define them like this:
Now to get the proper printed schema, we need to put the
\nourselves on the description:I think something changed on the
printSchemautility function.Beta Was this translation helpful? Give feedback.
All reactions