Block string parsing doesn't conform to GraphQL spec.
fpacanowski opened this issue · 0 comments
fpacanowski commented
Currently the following block string:
"""
Hello,
World!
Yours,
GraphQL.
"""
gets parsed as "\nHello,\n World!\n\nYours,\n GraphQL.\n\n".
GraphQL specification requires the leading and trailing empty lines (i.e. lines containing only whitespace) to be stripped from block string value. Quoting the block string spec:
4. While the first item line in lines contains only WhiteSpace:
a. Remove the first item from lines.
5. While the last item line in lines contains only WhiteSpace:
a. Remove the last item from lines.
So the above block string should be parsed as "Hello,\n World!\n\nYours,\n GraphQL.".