| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>highlight.graphql</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (GraphQL) - Theme (Breeze Light)"/> |
| 6 |
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre> |
| 7 |
<span style="color:#898887;"># Examples taken from https://graphql.org/learn/schema/#type-language</span> |
| 8 |
<span style="color:#898887;">#</span> |
| 9 |
<span style="color:#898887;"># Alerts: </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span><span style="color:#898887;"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">FIXME</span> |
| 10 |
|
| 11 |
<span style="font-weight:bold;">query</span> Hero(<span style="color:#0057ae;">$episode</span>: Episode, <span style="color:#0057ae;">$withFriends</span>: <span style="color:#0057ae;">Boolean</span>!) { |
| 12 |
hero(episode: <span style="color:#0057ae;">$episode</span>) { |
| 13 |
name |
| 14 |
friends <span style="color:#0057ae;">@include</span>(if: <span style="color:#0057ae;">$withFriends</span>) { |
| 15 |
} |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
<span style="font-weight:bold;">query</span> { |
| 20 |
droid(id: <span style="color:#bf0303;">"2000"</span>, num: <span style="color:#b08000;">42</span>, active: <span style="color:#aa5500;">true</span>) { |
| 21 |
name |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
<span style="font-weight:bold;">type</span> Person <span style="color:#0057ae;">@addExternalFields</span>(source: <span style="color:#bf0303;">"profiles"</span>) <span style="color:#0057ae;">@excludeField</span>(name: <span style="color:#bf0303;">"photo"</span>) { |
| 26 |
name: <span style="color:#0057ae;">String</span> |
| 27 |
} |
| 28 |
|
| 29 |
<span style="color:#898887;"># block strings (from https://github.com/graphql/graphql-spec/blob/master/spec/Section%202%20--%20Language.md)</span> |
| 30 |
|
| 31 |
<span style="color:#bf0303;">"""</span> |
| 32 |
<span style="color:#bf0303;">This starts with and ends with an empty line,</span> |
| 33 |
<span style="color:#bf0303;">which makes it easier to read.</span> |
| 34 |
<span style="color:#bf0303;">"""</span> |
| 35 |
|
| 36 |
<span style="color:#bf0303;">"""This does not start with or end with any empty lines,</span> |
| 37 |
<span style="color:#bf0303;">which makes it a little harder to read."""</span> |
| 38 |
</pre></body></html> |