You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This RFC adds a new lexed token, the "long string" aka multi-line string, similar to that found in Python and Scala.
A long string starts and ends with a triple-quote:
```
"""This is a long string
and it can contain multiple lines"""
```
Long strings are useful for typing literal bodies of text where new lines should be interpretted literally. In fact, the only escape sequence used is `\"""` and `\` is otherwise allowed unescaped. This is beneficial when writing documentation within strings which may reference the back-slash often:
```
"""
In a long-string \n and C:\\ are unescaped.
"""
```
The primary value of long-strings are to write long-form input directly in query text, in tools like GraphiQL, and as a prerequisite to another pending RFC to allow docstring style documentation in the Schema Definition Language.
0 commit comments