| 1 |
# Examples taken from https://graphql.org/learn/schema/#type-language |
| 2 |
# |
| 3 |
# Alerts: TODO FIXME |
| 4 |
|
| 5 |
query Hero($episode: Episode, $withFriends: Boolean!) { |
| 6 |
hero(episode: $episode) { |
| 7 |
name |
| 8 |
friends @include(if: $withFriends) { |
| 9 |
} |
| 10 |
} |
| 11 |
} |
| 12 |
|
| 13 |
query { |
| 14 |
droid(id: "2000", num: 42, active: true) { |
| 15 |
name |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
type Person @addExternalFields(source: "profiles") @excludeField(name: "photo") { |
| 20 |
name: String |
| 21 |
} |
| 22 |
|
| 23 |
# block strings (from https://github.com/graphql/graphql-spec/blob/master/spec/Section%202%20--%20Language.md) |
| 24 |
|
| 25 |
""" |
| 26 |
This starts with and ends with an empty line, |
| 27 |
which makes it easier to read. |
| 28 |
""" |
| 29 |
|
| 30 |
"""This does not start with or end with any empty lines, |
| 31 |
which makes it a little harder to read.""" |