├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── rust-toolchain └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.7.3" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 9 | ] 10 | 11 | [[package]] 12 | name = "atty" 13 | version = "0.2.11" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | dependencies = [ 16 | "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", 17 | "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 18 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 19 | ] 20 | 21 | [[package]] 22 | name = "autocfg" 23 | version = "0.1.4" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | 26 | [[package]] 27 | name = "base64" 28 | version = "0.9.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | dependencies = [ 31 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 32 | "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 33 | ] 34 | 35 | [[package]] 36 | name = "base64" 37 | version = "0.10.1" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | dependencies = [ 40 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 41 | ] 42 | 43 | [[package]] 44 | name = "bitflags" 45 | version = "1.0.4" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | 48 | [[package]] 49 | name = "byteorder" 50 | version = "1.3.1" 51 | source = "registry+https://github.com/rust-lang/crates.io-index" 52 | 53 | [[package]] 54 | name = "cc" 55 | version = "1.0.37" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | 58 | [[package]] 59 | name = "cfg-if" 60 | version = "0.1.9" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | 63 | [[package]] 64 | name = "chrono" 65 | version = "0.4.6" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | dependencies = [ 68 | "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 70 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 71 | ] 72 | 73 | [[package]] 74 | name = "cookie" 75 | version = "0.11.1" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | dependencies = [ 78 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 79 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 80 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 81 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 82 | ] 83 | 84 | [[package]] 85 | name = "devise" 86 | version = "0.2.0" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | dependencies = [ 89 | "devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 90 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 91 | ] 92 | 93 | [[package]] 94 | name = "devise_codegen" 95 | version = "0.2.0" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | dependencies = [ 98 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 100 | ] 101 | 102 | [[package]] 103 | name = "devise_core" 104 | version = "0.2.0" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | dependencies = [ 107 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 108 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 109 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 110 | "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", 111 | ] 112 | 113 | [[package]] 114 | name = "fnv" 115 | version = "1.0.6" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | 118 | [[package]] 119 | name = "httparse" 120 | version = "1.3.3" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | 123 | [[package]] 124 | name = "hyper" 125 | version = "0.10.16" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | dependencies = [ 128 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 129 | "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 130 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 131 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 132 | "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 133 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 134 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 135 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 136 | "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 137 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 138 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 139 | ] 140 | 141 | [[package]] 142 | name = "idna" 143 | version = "0.1.5" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | dependencies = [ 146 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 147 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 148 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 149 | ] 150 | 151 | [[package]] 152 | name = "indexmap" 153 | version = "1.0.2" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | dependencies = [ 156 | "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 157 | ] 158 | 159 | [[package]] 160 | name = "itoa" 161 | version = "0.4.4" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | 164 | [[package]] 165 | name = "juniper" 166 | version = "0.12.0" 167 | source = "git+https://github.com/graphql-rust/juniper.git#c2f119690b683303dbabf2a8b029cff76b596728" 168 | dependencies = [ 169 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 170 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 171 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 172 | "juniper_codegen 0.12.0 (git+https://github.com/graphql-rust/juniper.git)", 173 | "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 174 | "serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", 178 | ] 179 | 180 | [[package]] 181 | name = "juniper_codegen" 182 | version = "0.12.0" 183 | source = "git+https://github.com/graphql-rust/juniper.git#c2f119690b683303dbabf2a8b029cff76b596728" 184 | dependencies = [ 185 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 186 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 187 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 188 | "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 189 | "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", 190 | ] 191 | 192 | [[package]] 193 | name = "juniper_graphql" 194 | version = "0.1.0" 195 | dependencies = [ 196 | "juniper 0.12.0 (git+https://github.com/graphql-rust/juniper.git)", 197 | "juniper_rocket 0.3.0 (git+https://github.com/graphql-rust/juniper.git)", 198 | "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 199 | ] 200 | 201 | [[package]] 202 | name = "juniper_rocket" 203 | version = "0.3.0" 204 | source = "git+https://github.com/graphql-rust/juniper.git#c2f119690b683303dbabf2a8b029cff76b596728" 205 | dependencies = [ 206 | "juniper 0.12.0 (git+https://github.com/graphql-rust/juniper.git)", 207 | "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 208 | "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 209 | "serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 210 | "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", 211 | ] 212 | 213 | [[package]] 214 | name = "language-tags" 215 | version = "0.2.2" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | 218 | [[package]] 219 | name = "lazy_static" 220 | version = "1.3.0" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | 223 | [[package]] 224 | name = "libc" 225 | version = "0.2.57" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | 228 | [[package]] 229 | name = "log" 230 | version = "0.3.9" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | dependencies = [ 233 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 234 | ] 235 | 236 | [[package]] 237 | name = "log" 238 | version = "0.4.6" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | dependencies = [ 241 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 242 | ] 243 | 244 | [[package]] 245 | name = "matches" 246 | version = "0.1.8" 247 | source = "registry+https://github.com/rust-lang/crates.io-index" 248 | 249 | [[package]] 250 | name = "memchr" 251 | version = "2.2.0" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | 254 | [[package]] 255 | name = "mime" 256 | version = "0.2.6" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | dependencies = [ 259 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 260 | ] 261 | 262 | [[package]] 263 | name = "num-integer" 264 | version = "0.1.41" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | dependencies = [ 267 | "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 268 | "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 269 | ] 270 | 271 | [[package]] 272 | name = "num-traits" 273 | version = "0.2.8" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | dependencies = [ 276 | "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 277 | ] 278 | 279 | [[package]] 280 | name = "num_cpus" 281 | version = "1.10.0" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | dependencies = [ 284 | "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", 285 | ] 286 | 287 | [[package]] 288 | name = "numtoa" 289 | version = "0.1.0" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | 292 | [[package]] 293 | name = "pear" 294 | version = "0.1.2" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | dependencies = [ 297 | "pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 298 | ] 299 | 300 | [[package]] 301 | name = "pear_codegen" 302 | version = "0.1.2" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | dependencies = [ 305 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 306 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 307 | "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", 308 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 309 | "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 310 | ] 311 | 312 | [[package]] 313 | name = "percent-encoding" 314 | version = "1.0.1" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | 317 | [[package]] 318 | name = "proc-macro2" 319 | version = "0.4.30" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | dependencies = [ 322 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 323 | ] 324 | 325 | [[package]] 326 | name = "quote" 327 | version = "0.6.12" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | dependencies = [ 330 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 331 | ] 332 | 333 | [[package]] 334 | name = "redox_syscall" 335 | version = "0.1.54" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | 338 | [[package]] 339 | name = "redox_termios" 340 | version = "0.1.1" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | dependencies = [ 343 | "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", 344 | ] 345 | 346 | [[package]] 347 | name = "regex" 348 | version = "1.1.6" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | dependencies = [ 351 | "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", 352 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 353 | "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 354 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 355 | "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 356 | ] 357 | 358 | [[package]] 359 | name = "regex-syntax" 360 | version = "0.6.6" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | dependencies = [ 363 | "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 364 | ] 365 | 366 | [[package]] 367 | name = "ring" 368 | version = "0.13.5" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | dependencies = [ 371 | "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", 372 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 373 | "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", 374 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 375 | ] 376 | 377 | [[package]] 378 | name = "rocket" 379 | version = "0.4.2" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | dependencies = [ 382 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 383 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 384 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 385 | "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 386 | "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 387 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 388 | "rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 389 | "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 390 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 391 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 392 | "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 393 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 394 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 395 | ] 396 | 397 | [[package]] 398 | name = "rocket_codegen" 399 | version = "0.4.2" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | dependencies = [ 402 | "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 403 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 404 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 405 | "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 406 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 407 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 408 | ] 409 | 410 | [[package]] 411 | name = "rocket_http" 412 | version = "0.4.2" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | dependencies = [ 415 | "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 416 | "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", 417 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 418 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 419 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 420 | "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", 421 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 422 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 423 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 424 | ] 425 | 426 | [[package]] 427 | name = "ryu" 428 | version = "0.2.8" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | 431 | [[package]] 432 | name = "safemem" 433 | version = "0.3.0" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | 436 | [[package]] 437 | name = "serde" 438 | version = "1.0.92" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | 441 | [[package]] 442 | name = "serde_derive" 443 | version = "1.0.92" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | dependencies = [ 446 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 447 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 448 | "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", 449 | ] 450 | 451 | [[package]] 452 | name = "serde_json" 453 | version = "1.0.39" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | dependencies = [ 456 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 457 | "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 458 | "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 459 | ] 460 | 461 | [[package]] 462 | name = "smallvec" 463 | version = "0.6.9" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | 466 | [[package]] 467 | name = "state" 468 | version = "0.4.1" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | 471 | [[package]] 472 | name = "syn" 473 | version = "0.15.34" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | dependencies = [ 476 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 477 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 478 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 479 | ] 480 | 481 | [[package]] 482 | name = "termion" 483 | version = "1.5.2" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | dependencies = [ 486 | "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", 487 | "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", 489 | "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 490 | ] 491 | 492 | [[package]] 493 | name = "thread_local" 494 | version = "0.3.6" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | dependencies = [ 497 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 498 | ] 499 | 500 | [[package]] 501 | name = "time" 502 | version = "0.1.42" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | dependencies = [ 505 | "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", 506 | "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", 507 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 508 | ] 509 | 510 | [[package]] 511 | name = "toml" 512 | version = "0.4.10" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | dependencies = [ 515 | "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", 516 | ] 517 | 518 | [[package]] 519 | name = "traitobject" 520 | version = "0.1.0" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | 523 | [[package]] 524 | name = "typeable" 525 | version = "0.1.2" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | 528 | [[package]] 529 | name = "ucd-util" 530 | version = "0.1.3" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | 533 | [[package]] 534 | name = "unicase" 535 | version = "1.4.2" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | dependencies = [ 538 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 539 | ] 540 | 541 | [[package]] 542 | name = "unicode-bidi" 543 | version = "0.3.4" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | dependencies = [ 546 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 547 | ] 548 | 549 | [[package]] 550 | name = "unicode-normalization" 551 | version = "0.1.8" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | dependencies = [ 554 | "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", 555 | ] 556 | 557 | [[package]] 558 | name = "unicode-xid" 559 | version = "0.1.0" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | 562 | [[package]] 563 | name = "untrusted" 564 | version = "0.6.2" 565 | source = "registry+https://github.com/rust-lang/crates.io-index" 566 | 567 | [[package]] 568 | name = "url" 569 | version = "1.7.2" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | dependencies = [ 572 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 573 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 574 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 575 | ] 576 | 577 | [[package]] 578 | name = "utf8-ranges" 579 | version = "1.0.2" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | 582 | [[package]] 583 | name = "uuid" 584 | version = "0.7.4" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | 587 | [[package]] 588 | name = "version_check" 589 | version = "0.1.5" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | 592 | [[package]] 593 | name = "version_check" 594 | version = "0.9.1" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | 597 | [[package]] 598 | name = "winapi" 599 | version = "0.3.7" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | dependencies = [ 602 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 603 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 604 | ] 605 | 606 | [[package]] 607 | name = "winapi-i686-pc-windows-gnu" 608 | version = "0.4.0" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | 611 | [[package]] 612 | name = "winapi-x86_64-pc-windows-gnu" 613 | version = "0.4.0" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | 616 | [[package]] 617 | name = "yansi" 618 | version = "0.4.0" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | 621 | [[package]] 622 | name = "yansi" 623 | version = "0.5.0" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | 626 | [metadata] 627 | "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" 628 | "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 629 | "checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" 630 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 631 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 632 | "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 633 | "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" 634 | "checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" 635 | "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" 636 | "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" 637 | "checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0" 638 | "checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" 639 | "checksum devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" 640 | "checksum devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" 641 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 642 | "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" 643 | "checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" 644 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 645 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" 646 | "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 647 | "checksum juniper 0.12.0 (git+https://github.com/graphql-rust/juniper.git)" = "" 648 | "checksum juniper_codegen 0.12.0 (git+https://github.com/graphql-rust/juniper.git)" = "" 649 | "checksum juniper_rocket 0.3.0 (git+https://github.com/graphql-rust/juniper.git)" = "" 650 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 651 | "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" 652 | "checksum libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "a844cabbd5a77e60403a58af576f0a1baa83c3dd2670be63e615bd24fc58b82d" 653 | "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 654 | "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 655 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 656 | "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" 657 | "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" 658 | "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" 659 | "checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" 660 | "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" 661 | "checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" 662 | "checksum pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c26d2b92e47063ffce70d3e3b1bd097af121a9e0db07ca38a6cc1cf0cc85ff25" 663 | "checksum pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "336db4a192cc7f54efeb0c4e11a9245394824cc3bcbd37ba3ff51240c35d7a6e" 664 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 665 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 666 | "checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" 667 | "checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" 668 | "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 669 | "checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" 670 | "checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" 671 | "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" 672 | "checksum rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "42c1e9deb3ef4fa430d307bfccd4231434b707ca1328fae339c43ad1201cc6f7" 673 | "checksum rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "79aa1366f9b2eccddc05971e17c5de7bb75a5431eb12c2b5c66545fd348647f4" 674 | "checksum rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b1391457ee4e80b40d4b57fa5765c0f2836b20d73bcbee4e3f35d93cf3b80817" 675 | "checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" 676 | "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" 677 | "checksum serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "32746bf0f26eab52f06af0d0aa1984f641341d06d8d673c693871da2d188c9be" 678 | "checksum serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "46a3223d0c9ba936b61c0d2e3e559e3217dbfb8d65d06d26e8b3c25de38bae3e" 679 | "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" 680 | "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" 681 | "checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" 682 | "checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" 683 | "checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" 684 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 685 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 686 | "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" 687 | "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 688 | "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" 689 | "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" 690 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 691 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 692 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 693 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 694 | "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 695 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 696 | "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" 697 | "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" 698 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 699 | "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" 700 | "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" 701 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 702 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 703 | "checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" 704 | "checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" 705 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "juniper_graphql" 3 | version = "0.1.0" 4 | authors = ["Render Developers "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | juniper = { git = "https://github.com/graphql-rust/juniper.git" , default-features = true, features = ["expose-test-schema", "serde_json"]} 9 | juniper_rocket = { git = "https://github.com/graphql-rust/juniper.git" } 10 | rocket = "0.4.2" 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2019, Render Developers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A Rust GraphQL Server with Juniper and Rocket 2 | 3 | This repo can be used as a starting point to deploy [Rust](https://www.rust-lang.org) GraphQL servers on Render. 4 | It is based on the official [juniper_rocket](https://github.com/graphql-rust/juniper/tree/master/juniper_rocket) example 5 | and uses [GraphQL Playground](https://github.com/prisma/graphql-playground/) and Juniper `master`. 6 | 7 | The sample app is up at https://rust-graphql.onrender.com. Use the query below to start exploring! 8 | 9 | ```graphql 10 | query { 11 | human(id: "1002") { 12 | id 13 | name 14 | friends { 15 | id 16 | name 17 | } 18 | appearsIn 19 | } 20 | } 21 | ``` 22 | 23 | ## Deployment 24 | 25 | See the guide at https://render.com/docs/deploy-rust-graphql. 26 | -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | nightly-2019-11-01 2 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![feature(decl_macro, proc_macro_hygiene)] 2 | 3 | use rocket::response::content; 4 | use rocket::State; 5 | 6 | use juniper::tests::model::Database; 7 | use juniper::tests::schema::Query; 8 | use juniper::{EmptyMutation, RootNode}; 9 | 10 | type Schema = RootNode<'static, Query, EmptyMutation>; 11 | 12 | #[rocket::get("/")] 13 | fn graphiql() -> content::Html { 14 | juniper_rocket::playground_source("/graphql") 15 | } 16 | 17 | #[rocket::get("/graphql?")] 18 | fn get_graphql_handler( 19 | context: State, 20 | request: juniper_rocket::GraphQLRequest, 21 | schema: State, 22 | ) -> juniper_rocket::GraphQLResponse { 23 | request.execute(&schema, &context) 24 | } 25 | 26 | #[rocket::post("/graphql", data = "")] 27 | fn post_graphql_handler( 28 | context: State, 29 | request: juniper_rocket::GraphQLRequest, 30 | schema: State, 31 | ) -> juniper_rocket::GraphQLResponse { 32 | request.execute(&schema, &context) 33 | } 34 | 35 | fn main() { 36 | rocket::ignite() 37 | .manage(Database::new()) 38 | .manage(Schema::new(Query, EmptyMutation::::new())) 39 | .mount( 40 | "/", 41 | rocket::routes![graphiql, get_graphql_handler, post_graphql_handler], 42 | ) 43 | .launch(); 44 | } 45 | --------------------------------------------------------------------------------