forked from stkb/Rewrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GraphQL: Add support for Block Strings (stkb#261)
Co-authored-by: Steve Baker <scsavtnk@gmail.com>
- Loading branch information
1 parent
d9d2e17
commit c62907d
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
> language: "graphql" | ||
GraphQL supports comments (`#`) and Block Strings (`"""`). Comments are always | ||
single-line, while Block Strings are inherently multi-line. Block Strings are | ||
typically used to provide descriptions (documentation) for GraphQL types and | ||
operations. | ||
|
||
## Comments | ||
|
||
# a b c d e f g h i -> # a b c d¦ | ||
¦ # e f g h¦ | ||
¦ # i ¦ | ||
|
||
## Block Strings | ||
|
||
""" ¦ -> """ ¦ | ||
a b c d e f g h i a b c d e¦ | ||
""" ¦ f g h i ¦ | ||
¦ """ ¦ | ||
|
||
type Mutation { ¦ type Mutation { ¦ | ||
""" ¦ """ ¦ | ||
This is a long line. -> This is a ¦ | ||
""" ¦ long line. ¦ | ||
loginUser() String """ ¦ | ||
} ¦ loginUser() String | ||
¦ } ¦ | ||
|
||
foo { ¦ foo { ¦ | ||
bar(baz: """ bar(baz: """ | ||
a b c d e f -> a b c d e¦ | ||
g h ¦ f g h ¦ | ||
""") ¦ """) ¦ | ||
} ¦ } ¦ |