| 1 |
"""This is a description of the schema as a whole.""" |
| 2 |
schema { |
| 3 |
query: QueryType |
| 4 |
mutation: MutationType |
| 5 |
} |
| 6 |
|
| 7 |
""" |
| 8 |
This is a description |
| 9 |
of the `Foo` type. |
| 10 |
""" |
| 11 |
type Foo implements Bar & Baz & Two { |
| 12 |
"Description of the `one` field." |
| 13 |
one: Type |
| 14 |
""" |
| 15 |
This is a description of the `two` field. |
| 16 |
""" |
| 17 |
two( |
| 18 |
""" |
| 19 |
This is a description of the `argument` argument. |
| 20 |
""" |
| 21 |
argument: InputType! |
| 22 |
): Type |
| 23 |
"""This is a description of the `three` field.""" |
| 24 |
three(argument: InputType, other: String): Int |
| 25 |
four(argument: String = "string"): String |
| 26 |
five(argument: [String] = ["string", "string"]): String |
| 27 |
six(argument: InputType = {key: "value"}): Type |
| 28 |
seven(argument: Int = null): Type |
| 29 |
eight(argument: OneOfInputType): Type |
| 30 |
} |
| 31 |
|
| 32 |
type AnnotatedObject @onObject(arg: "value") { |
| 33 |
annotatedField(arg: Type = "default" @onArgumentDefinition): Type @onField |
| 34 |
} |
| 35 |
|
| 36 |
type UndefinedType |
| 37 |
|
| 38 |
extend type Foo { |
| 39 |
seven(argument: [String]): Type |
| 40 |
} |
| 41 |
|
| 42 |
extend type Foo @onType |
| 43 |
|
| 44 |
interface Bar { |
| 45 |
one: Type |
| 46 |
four(argument: String = "string"): String |
| 47 |
} |
| 48 |
|
| 49 |
interface AnnotatedInterface @onInterface { |
| 50 |
annotatedField(arg: Type @onArgumentDefinition): Type @onField |
| 51 |
} |
| 52 |
|
| 53 |
interface UndefinedInterface |
| 54 |
|
| 55 |
extend interface Bar implements Two { |
| 56 |
two(argument: InputType!): Type |
| 57 |
} |
| 58 |
|
| 59 |
extend interface Bar @onInterface |
| 60 |
|
| 61 |
interface Baz implements Bar & Two { |
| 62 |
one: Type |
| 63 |
two(argument: InputType!): Type |
| 64 |
four(argument: String = "string"): String |
| 65 |
} |
| 66 |
|
| 67 |
union Feed = |
| 68 |
| Story |
| 69 |
| Article |
| 70 |
| Advert |
| 71 |
|
| 72 |
union AnnotatedUnion @onUnion = A | B |
| 73 |
|
| 74 |
union AnnotatedUnionTwo @onUnion = | A | B |
| 75 |
|
| 76 |
union UndefinedUnion |
| 77 |
|
| 78 |
extend union Feed = Photo | Video |
| 79 |
|
| 80 |
extend union Feed @onUnion |
| 81 |
|
| 82 |
scalar CustomScalar |
| 83 |
|
| 84 |
scalar AnnotatedScalar @onScalar |
| 85 |
|
| 86 |
extend scalar CustomScalar @onScalar |
| 87 |
|
| 88 |
enum Site { |
| 89 |
""" |
| 90 |
This is a description of the `DESKTOP` value |
| 91 |
""" |
| 92 |
DESKTOP |
| 93 |
|
| 94 |
"""This is a description of the `MOBILE` value""" |
| 95 |
MOBILE |
| 96 |
|
| 97 |
"This is a description of the `WEB` value" |
| 98 |
WEB |
| 99 |
} |
| 100 |
|
| 101 |
enum AnnotatedEnum @onEnum { |
| 102 |
ANNOTATED_VALUE @onEnumValue |
| 103 |
OTHER_VALUE |
| 104 |
} |
| 105 |
|
| 106 |
enum UndefinedEnum |
| 107 |
|
| 108 |
extend enum Site { |
| 109 |
VR |
| 110 |
} |
| 111 |
|
| 112 |
extend enum Site @onEnum |
| 113 |
|
| 114 |
input InputType { |
| 115 |
key: String! |
| 116 |
answer: Int = 42 |
| 117 |
} |
| 118 |
|
| 119 |
input OneOfInputType @oneOf { |
| 120 |
string: String |
| 121 |
int: Int |
| 122 |
} |
| 123 |
|
| 124 |
input AnnotatedInput @onInputObject { |
| 125 |
annotatedField: Type @onInputFieldDefinition |
| 126 |
} |
| 127 |
|
| 128 |
input UndefinedInput |
| 129 |
|
| 130 |
extend input InputType { |
| 131 |
other: Float = 1.23e4 @onInputFieldDefinition |
| 132 |
} |
| 133 |
|
| 134 |
extend input InputType @onInputObject |
| 135 |
|
| 136 |
""" |
| 137 |
This is a description of the `@skip` directive |
| 138 |
""" |
| 139 |
directive @skip( |
| 140 |
"""This is a description of the `if` argument""" |
| 141 |
if: Boolean! @onArgumentDefinition |
| 142 |
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT |
| 143 |
|
| 144 |
directive @include(if: Boolean!) |
| 145 |
on FIELD |
| 146 |
| FRAGMENT_SPREAD |
| 147 |
| INLINE_FRAGMENT |
| 148 |
|
| 149 |
directive @include2(if: Boolean!) on |
| 150 |
| FIELD |
| 151 |
| FRAGMENT_SPREAD |
| 152 |
| INLINE_FRAGMENT |
| 153 |
|
| 154 |
directive @myRepeatableDir(name: String!) repeatable on |
| 155 |
| OBJECT |
| 156 |
| INTERFACE |
| 157 |
|
| 158 |
extend schema @onSchema |
| 159 |
|
| 160 |
extend schema @onSchema { |
| 161 |
subscription: SubscriptionType |
| 162 |
} |