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