schema-kitchen-sink.graphql

 1# Filename: schema-kitchen-sink.graphql
 2
 3schema {
 4  query: QueryType
 5  mutation: MutationType
 6}
 7
 8type Foo implements Bar {
 9  one: Type
10  two(argument: InputType!): Type
11  three(argument: InputType, other: String): Int
12  four(argument: String = "string"): String
13  five(argument: [String] = ["string", "string"]): String
14  six(argument: InputType = {key: "value"}): Type
15}
16
17type AnnotatedObject @onObject(arg: "value") {
18  annotatedField(arg: Type = "default" @onArg): Type @onField
19}
20
21interface Bar {
22  one: Type
23  four(argument: String = "string"): String
24}
25
26interface AnnotatedInterface @onInterface {
27  annotatedField(arg: Type @onArg): Type @onField
28}
29
30union Feed = Story | Article | Advert
31
32union AnnotatedUnion @onUnion = A | B
33
34scalar CustomScalar
35
36scalar AnnotatedScalar @onScalar
37
38enum Site {
39  DESKTOP
40  MOBILE
41}
42
43enum AnnotatedEnum @onEnum {
44  ANNOTATED_VALUE @onEnumValue
45  OTHER_VALUE
46}
47
48input InputType {
49  key: String!
50  answer: Int = 42
51}
52
53input AnnotatedInput @onInputObjectType {
54  annotatedField: Type @onField
55}
56
57extend type Foo {
58  seven(argument: [String]): Type
59}
60
61extend type Foo @onType {}
62
63type NoFields {}
64
65directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
66
67directive @include(if: Boolean!)
68  on FIELD
69  | FRAGMENT_SPREAD
70  | INLINE_FRAGMENT