...
1query Hero($episode: Episode, $withFriends: Boolean!) {
2 hero(episode: $episode) {
3 name
4 friends @include(if: $withFriends) {
5 name
6 ...frag
7
8 ... {
9 inlineFrag
10 }
11 }
12 }
13}
14
15fragment frag on User {
16 id
17 name
18 profilePic(size: 50)
19}
20
21# Switching to schema
22"Description for the type"
23type MyObjectType {
24 """
25 Description for field
26 Supports **multi-line** description for your [API](http://example.com)!
27 """
28 myField: String! @deprecated(reason: "Use `newField`.")
29
30 otherField(
31 "Description for argument"
32 arg: Int
33 )
34}
35
36input Foo {
37 bar [String!]! = ["baz"]
38}
39
40directive @deprecated(
41 reason: String = "No longer supported"
42) on FIELD_DEFINITION | ENUM_VALUE
View as plain text