|
| 1 | +schema { |
| 2 | + query: Query |
| 3 | + subscription: Subscription |
| 4 | +} |
| 5 | + |
| 6 | +type Query { |
| 7 | + "Fetches an object given its ID." |
| 8 | + node("ID of the object." id: ID!): Node |
| 9 | + "Lookup nodes by a list of IDs." |
| 10 | + nodes("The list of node IDs." ids: [ID!]!): [Node]! |
| 11 | + isSelectedTest: IsSelectedNode! |
| 12 | + """ |
| 13 | + Gets the product. |
| 14 | + |
| 15 | + |
| 16 | + **Returns:** |
| 17 | + The only product. |
| 18 | + """ |
| 19 | + product: Product! |
| 20 | + books( |
| 21 | + "Returns the first _n_ elements from the list." |
| 22 | + first: Int |
| 23 | + "Returns the elements in the list that come after the specified cursor." |
| 24 | + after: String |
| 25 | + "Returns the last _n_ elements from the list." |
| 26 | + last: Int |
| 27 | + "Returns the elements in the list that come before the specified cursor." |
| 28 | + before: String |
| 29 | + ): BookConnection |
| 30 | + favoriteBooks( |
| 31 | + "Returns the first _n_ elements from the list." |
| 32 | + first: Int |
| 33 | + "Returns the elements in the list that come after the specified cursor." |
| 34 | + after: String |
| 35 | + "Returns the last _n_ elements from the list." |
| 36 | + last: Int |
| 37 | + "Returns the elements in the list that come before the specified cursor." |
| 38 | + before: String |
| 39 | + ): BookConnection |
| 40 | + ints( |
| 41 | + "Returns the first _n_ elements from the list." |
| 42 | + first: Int |
| 43 | + "Returns the elements in the list that come after the specified cursor." |
| 44 | + after: String |
| 45 | + "Returns the last _n_ elements from the list." |
| 46 | + last: Int |
| 47 | + "Returns the elements in the list that come before the specified cursor." |
| 48 | + before: String |
| 49 | + ): IntConnection |
| 50 | + products( |
| 51 | + "Returns the elements in the list that come after the specified cursor." |
| 52 | + after: Version2 |
| 53 | + "Returns the first _n_ elements from the list." |
| 54 | + first: Int |
| 55 | + "Returns the last _n_ elements from the list." |
| 56 | + last: Int |
| 57 | + "Returns the elements in the list that come before the specified cursor." |
| 58 | + before: String |
| 59 | + ): ProductConnection |
| 60 | + argumentWithExplicitType(arg: Version2): String! |
| 61 | + nullableArgumentWithExplicitType(arg: Version2): String! |
| 62 | + nullableArrayArgumentRef(items: [String!]): String! |
| 63 | + arrayArgumentRef(items: [String!]!): String! |
| 64 | + arrayNullableElementArgumentRef(items: [String]!): String! |
| 65 | + nullableArrayNullableElementArgumentRef(items: [String]): String! |
| 66 | + nullableListArgumentRef(items: [String!]): String! |
| 67 | + listArgumentRef(items: [String!]!): String! |
| 68 | + listNullableElementArgumentRef(items: [String]!): String! |
| 69 | + nullableListNullableElementArgumentRef(items: [String]): String! |
| 70 | + issue8057Entity(id: ID!): Issue8057Entity |
| 71 | +} |
| 72 | + |
| 73 | +type Subscription { |
| 74 | + onProductAdded(categoryId: Int!): Int! |
| 75 | + onProductPriceChanged(productId: Int!): Int! |
| 76 | +} |
| 77 | + |
| 78 | +type Book implements Product { |
| 79 | + title: String! |
| 80 | + id: String! |
| 81 | + kind: String! |
| 82 | +} |
| 83 | + |
| 84 | +"A connection to a list of items." |
| 85 | +type BookConnection { |
| 86 | + "Information to aid in pagination." |
| 87 | + pageInfo: PageInfo! |
| 88 | + "A list of edges." |
| 89 | + edges: [BookEdge!] |
| 90 | + "A flattened list of the nodes." |
| 91 | + nodes: [Book!] |
| 92 | +} |
| 93 | + |
| 94 | +"An edge in a connection." |
| 95 | +type BookEdge { |
| 96 | + "A cursor for use in pagination." |
| 97 | + cursor: String! |
| 98 | + "The item at the end of the edge." |
| 99 | + node: Book! |
| 100 | +} |
| 101 | + |
| 102 | +"A connection to a list of items." |
| 103 | +type IntConnection { |
| 104 | + "Information to aid in pagination." |
| 105 | + pageInfo: PageInfo! |
| 106 | + "A list of edges." |
| 107 | + edges: [IntEdge!] |
| 108 | + "A flattened list of the nodes." |
| 109 | + nodes: [Int!] |
| 110 | +} |
| 111 | + |
| 112 | +"An edge in a connection." |
| 113 | +type IntEdge { |
| 114 | + "A cursor for use in pagination." |
| 115 | + cursor: String! |
| 116 | + "The item at the end of the edge." |
| 117 | + node: Int! |
| 118 | +} |
| 119 | + |
| 120 | +type IsSelectedNode implements Node { |
| 121 | + id: ID! |
| 122 | + name: String! |
| 123 | + description: String! |
| 124 | + wasNameSelected: Boolean! |
| 125 | +} |
| 126 | + |
| 127 | +type Issue8057Entity implements Node { |
| 128 | + id: ID! |
| 129 | +} |
| 130 | + |
| 131 | +"Information about pagination in a connection." |
| 132 | +type PageInfo { |
| 133 | + "Indicates whether more edges exist following the set defined by the clients arguments." |
| 134 | + hasNextPage: Boolean! |
| 135 | + "Indicates whether more edges exist prior the set defined by the clients arguments." |
| 136 | + hasPreviousPage: Boolean! |
| 137 | + "When paginating backwards, the cursor to continue." |
| 138 | + startCursor: String |
| 139 | + "When paginating forwards, the cursor to continue." |
| 140 | + endCursor: String |
| 141 | +} |
| 142 | + |
| 143 | +"A connection to a list of items." |
| 144 | +type ProductConnection { |
| 145 | + "Information to aid in pagination." |
| 146 | + pageInfo: PageInfo! |
| 147 | + "A list of edges." |
| 148 | + edges: [ProductEdge!] |
| 149 | + "A flattened list of the nodes." |
| 150 | + nodes: [Product!] |
| 151 | +} |
| 152 | + |
| 153 | +"An edge in a connection." |
| 154 | +type ProductEdge { |
| 155 | + "A cursor for use in pagination." |
| 156 | + cursor: String! |
| 157 | + "The item at the end of the edge." |
| 158 | + node: Product! |
| 159 | +} |
| 160 | + |
| 161 | +type Television implements Product { |
| 162 | + argumentWithExplicitType(arg: Version!): String! |
| 163 | + nullableArgumentWithExplicitType(arg: Version): String! |
| 164 | + id: String! |
| 165 | + kind: String! |
| 166 | +} |
| 167 | + |
| 168 | +"The node interface is implemented by entities that have a global unique identifier." |
| 169 | +interface Node { |
| 170 | + id: ID! |
| 171 | +} |
| 172 | + |
| 173 | +interface Product { |
| 174 | + kind: String! |
| 175 | + id: String! |
| 176 | +} |
| 177 | + |
| 178 | +scalar Version |
| 179 | + |
| 180 | +scalar Version2 |
0 commit comments