├── .gitignore ├── README.md ├── data ├── schema.graphql └── schema.json ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── src ├── App.js ├── index.js └── relay │ ├── Environment.js │ ├── createQueryRendererModern.js │ ├── fetchQuery.js │ └── index.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | __generated__ 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Create React App + Relay 2 | 3 | Based on this https://facebook.github.io/create-react-app/docs/adding-relay 4 | and this https://facebook.github.io/relay/docs/en/installation-and-setup.html 5 | 6 | This uses babel-plugin-macro to enable babel-plugin-relay without ejecting from CRA 7 | 8 | ## To generate compiled queries artifacts 9 | ```bash 10 | yarn relay 11 | ``` 12 | 13 | ## To run your app 14 | ```bash 15 | yarn start 16 | ``` 17 | -------------------------------------------------------------------------------- /data/schema.graphql: -------------------------------------------------------------------------------- 1 | type Mutation { 2 | UserChangePassword(input: UserChangePasswordInput!): UserChangePasswordPayload 3 | UserLoginWithEmail(input: UserLoginWithEmailInput!): UserLoginWithEmailPayload 4 | UserRegisterWithEmail(input: UserRegisterWithEmailInput!): UserRegisterWithEmailPayload 5 | } 6 | 7 | """An object with an ID""" 8 | interface Node { 9 | """The id of the object.""" 10 | id: ID! 11 | } 12 | 13 | """Information about pagination in a connection.""" 14 | type PageInfoExtended { 15 | """When paginating forwards, are there more items?""" 16 | hasNextPage: Boolean! 17 | 18 | """When paginating backwards, are there more items?""" 19 | hasPreviousPage: Boolean! 20 | 21 | """When paginating backwards, the cursor to continue.""" 22 | startCursor: String 23 | 24 | """When paginating forwards, the cursor to continue.""" 25 | endCursor: String 26 | } 27 | 28 | """The root of all... queries""" 29 | type Query { 30 | """Fetches an object given its ID""" 31 | node( 32 | """The ID of an object""" 33 | id: ID! 34 | ): Node 35 | me: User 36 | user(id: ID!): User 37 | users(after: String, first: Int, before: String, last: Int, search: String): UserConnection 38 | } 39 | 40 | type Subscription { 41 | UserAdded: UserAddedPayload 42 | } 43 | 44 | """User data""" 45 | type User implements Node { 46 | """The ID of an object""" 47 | id: ID! 48 | _id: String 49 | name: String 50 | email: String 51 | active: Boolean 52 | } 53 | 54 | type UserAddedPayload { 55 | userEdge: UserEdge 56 | } 57 | 58 | input UserChangePasswordInput { 59 | oldPassword: String! 60 | 61 | """user new password""" 62 | password: String! 63 | clientMutationId: String 64 | } 65 | 66 | type UserChangePasswordPayload { 67 | error: String 68 | me: User 69 | clientMutationId: String 70 | } 71 | 72 | """A connection to a list of items.""" 73 | type UserConnection { 74 | """Number of items in this connection""" 75 | count: Int! 76 | 77 | """ 78 | A count of the total number of objects in this connection, ignoring pagination. 79 | This allows a client to fetch the first five objects by passing "5" as the 80 | argument to "first", then fetch the total count so it could display "5 of 83", 81 | for example. 82 | """ 83 | totalCount: Int! 84 | 85 | """Offset from start""" 86 | startCursorOffset: Int! 87 | 88 | """Offset till end""" 89 | endCursorOffset: Int! 90 | 91 | """Information to aid in pagination.""" 92 | pageInfo: PageInfoExtended! 93 | 94 | """A list of edges.""" 95 | edges: [UserEdge]! 96 | } 97 | 98 | """An edge in a connection.""" 99 | type UserEdge { 100 | """The item at the end of the edge""" 101 | node: User! 102 | 103 | """A cursor for use in pagination""" 104 | cursor: String! 105 | } 106 | 107 | input UserLoginWithEmailInput { 108 | email: String! 109 | password: String! 110 | clientMutationId: String 111 | } 112 | 113 | type UserLoginWithEmailPayload { 114 | token: String 115 | error: String 116 | clientMutationId: String 117 | } 118 | 119 | input UserRegisterWithEmailInput { 120 | name: String! 121 | email: String! 122 | password: String! 123 | clientMutationId: String 124 | } 125 | 126 | type UserRegisterWithEmailPayload { 127 | token: String 128 | error: String 129 | clientMutationId: String 130 | } 131 | -------------------------------------------------------------------------------- /data/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "__schema": { 4 | "queryType": { 5 | "name": "Query" 6 | }, 7 | "mutationType": { 8 | "name": "Mutation" 9 | }, 10 | "subscriptionType": { 11 | "name": "Subscription" 12 | }, 13 | "types": [ 14 | { 15 | "kind": "OBJECT", 16 | "name": "Query", 17 | "description": "The root of all... queries", 18 | "fields": [ 19 | { 20 | "name": "node", 21 | "description": "Fetches an object given its ID", 22 | "args": [ 23 | { 24 | "name": "id", 25 | "description": "The ID of an object", 26 | "type": { 27 | "kind": "NON_NULL", 28 | "name": null, 29 | "ofType": { 30 | "kind": "SCALAR", 31 | "name": "ID", 32 | "ofType": null 33 | } 34 | }, 35 | "defaultValue": null 36 | } 37 | ], 38 | "type": { 39 | "kind": "INTERFACE", 40 | "name": "Node", 41 | "ofType": null 42 | }, 43 | "isDeprecated": false, 44 | "deprecationReason": null 45 | }, 46 | { 47 | "name": "me", 48 | "description": null, 49 | "args": [], 50 | "type": { 51 | "kind": "OBJECT", 52 | "name": "User", 53 | "ofType": null 54 | }, 55 | "isDeprecated": false, 56 | "deprecationReason": null 57 | }, 58 | { 59 | "name": "user", 60 | "description": null, 61 | "args": [ 62 | { 63 | "name": "id", 64 | "description": null, 65 | "type": { 66 | "kind": "NON_NULL", 67 | "name": null, 68 | "ofType": { 69 | "kind": "SCALAR", 70 | "name": "ID", 71 | "ofType": null 72 | } 73 | }, 74 | "defaultValue": null 75 | } 76 | ], 77 | "type": { 78 | "kind": "OBJECT", 79 | "name": "User", 80 | "ofType": null 81 | }, 82 | "isDeprecated": false, 83 | "deprecationReason": null 84 | }, 85 | { 86 | "name": "users", 87 | "description": null, 88 | "args": [ 89 | { 90 | "name": "after", 91 | "description": null, 92 | "type": { 93 | "kind": "SCALAR", 94 | "name": "String", 95 | "ofType": null 96 | }, 97 | "defaultValue": null 98 | }, 99 | { 100 | "name": "first", 101 | "description": null, 102 | "type": { 103 | "kind": "SCALAR", 104 | "name": "Int", 105 | "ofType": null 106 | }, 107 | "defaultValue": null 108 | }, 109 | { 110 | "name": "before", 111 | "description": null, 112 | "type": { 113 | "kind": "SCALAR", 114 | "name": "String", 115 | "ofType": null 116 | }, 117 | "defaultValue": null 118 | }, 119 | { 120 | "name": "last", 121 | "description": null, 122 | "type": { 123 | "kind": "SCALAR", 124 | "name": "Int", 125 | "ofType": null 126 | }, 127 | "defaultValue": null 128 | }, 129 | { 130 | "name": "search", 131 | "description": null, 132 | "type": { 133 | "kind": "SCALAR", 134 | "name": "String", 135 | "ofType": null 136 | }, 137 | "defaultValue": null 138 | } 139 | ], 140 | "type": { 141 | "kind": "OBJECT", 142 | "name": "UserConnection", 143 | "ofType": null 144 | }, 145 | "isDeprecated": false, 146 | "deprecationReason": null 147 | } 148 | ], 149 | "inputFields": null, 150 | "interfaces": [], 151 | "enumValues": null, 152 | "possibleTypes": null 153 | }, 154 | { 155 | "kind": "SCALAR", 156 | "name": "ID", 157 | "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", 158 | "fields": null, 159 | "inputFields": null, 160 | "interfaces": null, 161 | "enumValues": null, 162 | "possibleTypes": null 163 | }, 164 | { 165 | "kind": "INTERFACE", 166 | "name": "Node", 167 | "description": "An object with an ID", 168 | "fields": [ 169 | { 170 | "name": "id", 171 | "description": "The id of the object.", 172 | "args": [], 173 | "type": { 174 | "kind": "NON_NULL", 175 | "name": null, 176 | "ofType": { 177 | "kind": "SCALAR", 178 | "name": "ID", 179 | "ofType": null 180 | } 181 | }, 182 | "isDeprecated": false, 183 | "deprecationReason": null 184 | } 185 | ], 186 | "inputFields": null, 187 | "interfaces": null, 188 | "enumValues": null, 189 | "possibleTypes": [ 190 | { 191 | "kind": "OBJECT", 192 | "name": "User", 193 | "ofType": null 194 | } 195 | ] 196 | }, 197 | { 198 | "kind": "OBJECT", 199 | "name": "User", 200 | "description": "User data", 201 | "fields": [ 202 | { 203 | "name": "id", 204 | "description": "The ID of an object", 205 | "args": [], 206 | "type": { 207 | "kind": "NON_NULL", 208 | "name": null, 209 | "ofType": { 210 | "kind": "SCALAR", 211 | "name": "ID", 212 | "ofType": null 213 | } 214 | }, 215 | "isDeprecated": false, 216 | "deprecationReason": null 217 | }, 218 | { 219 | "name": "_id", 220 | "description": null, 221 | "args": [], 222 | "type": { 223 | "kind": "SCALAR", 224 | "name": "String", 225 | "ofType": null 226 | }, 227 | "isDeprecated": false, 228 | "deprecationReason": null 229 | }, 230 | { 231 | "name": "name", 232 | "description": null, 233 | "args": [], 234 | "type": { 235 | "kind": "SCALAR", 236 | "name": "String", 237 | "ofType": null 238 | }, 239 | "isDeprecated": false, 240 | "deprecationReason": null 241 | }, 242 | { 243 | "name": "email", 244 | "description": null, 245 | "args": [], 246 | "type": { 247 | "kind": "SCALAR", 248 | "name": "String", 249 | "ofType": null 250 | }, 251 | "isDeprecated": false, 252 | "deprecationReason": null 253 | }, 254 | { 255 | "name": "active", 256 | "description": null, 257 | "args": [], 258 | "type": { 259 | "kind": "SCALAR", 260 | "name": "Boolean", 261 | "ofType": null 262 | }, 263 | "isDeprecated": false, 264 | "deprecationReason": null 265 | } 266 | ], 267 | "inputFields": null, 268 | "interfaces": [ 269 | { 270 | "kind": "INTERFACE", 271 | "name": "Node", 272 | "ofType": null 273 | } 274 | ], 275 | "enumValues": null, 276 | "possibleTypes": null 277 | }, 278 | { 279 | "kind": "SCALAR", 280 | "name": "String", 281 | "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", 282 | "fields": null, 283 | "inputFields": null, 284 | "interfaces": null, 285 | "enumValues": null, 286 | "possibleTypes": null 287 | }, 288 | { 289 | "kind": "SCALAR", 290 | "name": "Boolean", 291 | "description": "The `Boolean` scalar type represents `true` or `false`.", 292 | "fields": null, 293 | "inputFields": null, 294 | "interfaces": null, 295 | "enumValues": null, 296 | "possibleTypes": null 297 | }, 298 | { 299 | "kind": "SCALAR", 300 | "name": "Int", 301 | "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ", 302 | "fields": null, 303 | "inputFields": null, 304 | "interfaces": null, 305 | "enumValues": null, 306 | "possibleTypes": null 307 | }, 308 | { 309 | "kind": "OBJECT", 310 | "name": "UserConnection", 311 | "description": "A connection to a list of items.", 312 | "fields": [ 313 | { 314 | "name": "count", 315 | "description": "Number of items in this connection", 316 | "args": [], 317 | "type": { 318 | "kind": "NON_NULL", 319 | "name": null, 320 | "ofType": { 321 | "kind": "SCALAR", 322 | "name": "Int", 323 | "ofType": null 324 | } 325 | }, 326 | "isDeprecated": false, 327 | "deprecationReason": null 328 | }, 329 | { 330 | "name": "totalCount", 331 | "description": "A count of the total number of objects in this connection, ignoring pagination.\n This allows a client to fetch the first five objects by passing \"5\" as the\n argument to \"first\", then fetch the total count so it could display \"5 of 83\",\n for example.", 332 | "args": [], 333 | "type": { 334 | "kind": "NON_NULL", 335 | "name": null, 336 | "ofType": { 337 | "kind": "SCALAR", 338 | "name": "Int", 339 | "ofType": null 340 | } 341 | }, 342 | "isDeprecated": false, 343 | "deprecationReason": null 344 | }, 345 | { 346 | "name": "startCursorOffset", 347 | "description": "Offset from start", 348 | "args": [], 349 | "type": { 350 | "kind": "NON_NULL", 351 | "name": null, 352 | "ofType": { 353 | "kind": "SCALAR", 354 | "name": "Int", 355 | "ofType": null 356 | } 357 | }, 358 | "isDeprecated": false, 359 | "deprecationReason": null 360 | }, 361 | { 362 | "name": "endCursorOffset", 363 | "description": "Offset till end", 364 | "args": [], 365 | "type": { 366 | "kind": "NON_NULL", 367 | "name": null, 368 | "ofType": { 369 | "kind": "SCALAR", 370 | "name": "Int", 371 | "ofType": null 372 | } 373 | }, 374 | "isDeprecated": false, 375 | "deprecationReason": null 376 | }, 377 | { 378 | "name": "pageInfo", 379 | "description": "Information to aid in pagination.", 380 | "args": [], 381 | "type": { 382 | "kind": "NON_NULL", 383 | "name": null, 384 | "ofType": { 385 | "kind": "OBJECT", 386 | "name": "PageInfoExtended", 387 | "ofType": null 388 | } 389 | }, 390 | "isDeprecated": false, 391 | "deprecationReason": null 392 | }, 393 | { 394 | "name": "edges", 395 | "description": "A list of edges.", 396 | "args": [], 397 | "type": { 398 | "kind": "NON_NULL", 399 | "name": null, 400 | "ofType": { 401 | "kind": "LIST", 402 | "name": null, 403 | "ofType": { 404 | "kind": "OBJECT", 405 | "name": "UserEdge", 406 | "ofType": null 407 | } 408 | } 409 | }, 410 | "isDeprecated": false, 411 | "deprecationReason": null 412 | } 413 | ], 414 | "inputFields": null, 415 | "interfaces": [], 416 | "enumValues": null, 417 | "possibleTypes": null 418 | }, 419 | { 420 | "kind": "OBJECT", 421 | "name": "PageInfoExtended", 422 | "description": "Information about pagination in a connection.", 423 | "fields": [ 424 | { 425 | "name": "hasNextPage", 426 | "description": "When paginating forwards, are there more items?", 427 | "args": [], 428 | "type": { 429 | "kind": "NON_NULL", 430 | "name": null, 431 | "ofType": { 432 | "kind": "SCALAR", 433 | "name": "Boolean", 434 | "ofType": null 435 | } 436 | }, 437 | "isDeprecated": false, 438 | "deprecationReason": null 439 | }, 440 | { 441 | "name": "hasPreviousPage", 442 | "description": "When paginating backwards, are there more items?", 443 | "args": [], 444 | "type": { 445 | "kind": "NON_NULL", 446 | "name": null, 447 | "ofType": { 448 | "kind": "SCALAR", 449 | "name": "Boolean", 450 | "ofType": null 451 | } 452 | }, 453 | "isDeprecated": false, 454 | "deprecationReason": null 455 | }, 456 | { 457 | "name": "startCursor", 458 | "description": "When paginating backwards, the cursor to continue.", 459 | "args": [], 460 | "type": { 461 | "kind": "SCALAR", 462 | "name": "String", 463 | "ofType": null 464 | }, 465 | "isDeprecated": false, 466 | "deprecationReason": null 467 | }, 468 | { 469 | "name": "endCursor", 470 | "description": "When paginating forwards, the cursor to continue.", 471 | "args": [], 472 | "type": { 473 | "kind": "SCALAR", 474 | "name": "String", 475 | "ofType": null 476 | }, 477 | "isDeprecated": false, 478 | "deprecationReason": null 479 | } 480 | ], 481 | "inputFields": null, 482 | "interfaces": [], 483 | "enumValues": null, 484 | "possibleTypes": null 485 | }, 486 | { 487 | "kind": "OBJECT", 488 | "name": "UserEdge", 489 | "description": "An edge in a connection.", 490 | "fields": [ 491 | { 492 | "name": "node", 493 | "description": "The item at the end of the edge", 494 | "args": [], 495 | "type": { 496 | "kind": "NON_NULL", 497 | "name": null, 498 | "ofType": { 499 | "kind": "OBJECT", 500 | "name": "User", 501 | "ofType": null 502 | } 503 | }, 504 | "isDeprecated": false, 505 | "deprecationReason": null 506 | }, 507 | { 508 | "name": "cursor", 509 | "description": "A cursor for use in pagination", 510 | "args": [], 511 | "type": { 512 | "kind": "NON_NULL", 513 | "name": null, 514 | "ofType": { 515 | "kind": "SCALAR", 516 | "name": "String", 517 | "ofType": null 518 | } 519 | }, 520 | "isDeprecated": false, 521 | "deprecationReason": null 522 | } 523 | ], 524 | "inputFields": null, 525 | "interfaces": [], 526 | "enumValues": null, 527 | "possibleTypes": null 528 | }, 529 | { 530 | "kind": "OBJECT", 531 | "name": "Mutation", 532 | "description": null, 533 | "fields": [ 534 | { 535 | "name": "UserChangePassword", 536 | "description": null, 537 | "args": [ 538 | { 539 | "name": "input", 540 | "description": null, 541 | "type": { 542 | "kind": "NON_NULL", 543 | "name": null, 544 | "ofType": { 545 | "kind": "INPUT_OBJECT", 546 | "name": "UserChangePasswordInput", 547 | "ofType": null 548 | } 549 | }, 550 | "defaultValue": null 551 | } 552 | ], 553 | "type": { 554 | "kind": "OBJECT", 555 | "name": "UserChangePasswordPayload", 556 | "ofType": null 557 | }, 558 | "isDeprecated": false, 559 | "deprecationReason": null 560 | }, 561 | { 562 | "name": "UserLoginWithEmail", 563 | "description": null, 564 | "args": [ 565 | { 566 | "name": "input", 567 | "description": null, 568 | "type": { 569 | "kind": "NON_NULL", 570 | "name": null, 571 | "ofType": { 572 | "kind": "INPUT_OBJECT", 573 | "name": "UserLoginWithEmailInput", 574 | "ofType": null 575 | } 576 | }, 577 | "defaultValue": null 578 | } 579 | ], 580 | "type": { 581 | "kind": "OBJECT", 582 | "name": "UserLoginWithEmailPayload", 583 | "ofType": null 584 | }, 585 | "isDeprecated": false, 586 | "deprecationReason": null 587 | }, 588 | { 589 | "name": "UserRegisterWithEmail", 590 | "description": null, 591 | "args": [ 592 | { 593 | "name": "input", 594 | "description": null, 595 | "type": { 596 | "kind": "NON_NULL", 597 | "name": null, 598 | "ofType": { 599 | "kind": "INPUT_OBJECT", 600 | "name": "UserRegisterWithEmailInput", 601 | "ofType": null 602 | } 603 | }, 604 | "defaultValue": null 605 | } 606 | ], 607 | "type": { 608 | "kind": "OBJECT", 609 | "name": "UserRegisterWithEmailPayload", 610 | "ofType": null 611 | }, 612 | "isDeprecated": false, 613 | "deprecationReason": null 614 | } 615 | ], 616 | "inputFields": null, 617 | "interfaces": [], 618 | "enumValues": null, 619 | "possibleTypes": null 620 | }, 621 | { 622 | "kind": "INPUT_OBJECT", 623 | "name": "UserChangePasswordInput", 624 | "description": null, 625 | "fields": null, 626 | "inputFields": [ 627 | { 628 | "name": "oldPassword", 629 | "description": null, 630 | "type": { 631 | "kind": "NON_NULL", 632 | "name": null, 633 | "ofType": { 634 | "kind": "SCALAR", 635 | "name": "String", 636 | "ofType": null 637 | } 638 | }, 639 | "defaultValue": null 640 | }, 641 | { 642 | "name": "password", 643 | "description": "user new password", 644 | "type": { 645 | "kind": "NON_NULL", 646 | "name": null, 647 | "ofType": { 648 | "kind": "SCALAR", 649 | "name": "String", 650 | "ofType": null 651 | } 652 | }, 653 | "defaultValue": null 654 | }, 655 | { 656 | "name": "clientMutationId", 657 | "description": null, 658 | "type": { 659 | "kind": "SCALAR", 660 | "name": "String", 661 | "ofType": null 662 | }, 663 | "defaultValue": null 664 | } 665 | ], 666 | "interfaces": null, 667 | "enumValues": null, 668 | "possibleTypes": null 669 | }, 670 | { 671 | "kind": "OBJECT", 672 | "name": "UserChangePasswordPayload", 673 | "description": null, 674 | "fields": [ 675 | { 676 | "name": "error", 677 | "description": null, 678 | "args": [], 679 | "type": { 680 | "kind": "SCALAR", 681 | "name": "String", 682 | "ofType": null 683 | }, 684 | "isDeprecated": false, 685 | "deprecationReason": null 686 | }, 687 | { 688 | "name": "me", 689 | "description": null, 690 | "args": [], 691 | "type": { 692 | "kind": "OBJECT", 693 | "name": "User", 694 | "ofType": null 695 | }, 696 | "isDeprecated": false, 697 | "deprecationReason": null 698 | }, 699 | { 700 | "name": "clientMutationId", 701 | "description": null, 702 | "args": [], 703 | "type": { 704 | "kind": "SCALAR", 705 | "name": "String", 706 | "ofType": null 707 | }, 708 | "isDeprecated": false, 709 | "deprecationReason": null 710 | } 711 | ], 712 | "inputFields": null, 713 | "interfaces": [], 714 | "enumValues": null, 715 | "possibleTypes": null 716 | }, 717 | { 718 | "kind": "INPUT_OBJECT", 719 | "name": "UserLoginWithEmailInput", 720 | "description": null, 721 | "fields": null, 722 | "inputFields": [ 723 | { 724 | "name": "email", 725 | "description": null, 726 | "type": { 727 | "kind": "NON_NULL", 728 | "name": null, 729 | "ofType": { 730 | "kind": "SCALAR", 731 | "name": "String", 732 | "ofType": null 733 | } 734 | }, 735 | "defaultValue": null 736 | }, 737 | { 738 | "name": "password", 739 | "description": null, 740 | "type": { 741 | "kind": "NON_NULL", 742 | "name": null, 743 | "ofType": { 744 | "kind": "SCALAR", 745 | "name": "String", 746 | "ofType": null 747 | } 748 | }, 749 | "defaultValue": null 750 | }, 751 | { 752 | "name": "clientMutationId", 753 | "description": null, 754 | "type": { 755 | "kind": "SCALAR", 756 | "name": "String", 757 | "ofType": null 758 | }, 759 | "defaultValue": null 760 | } 761 | ], 762 | "interfaces": null, 763 | "enumValues": null, 764 | "possibleTypes": null 765 | }, 766 | { 767 | "kind": "OBJECT", 768 | "name": "UserLoginWithEmailPayload", 769 | "description": null, 770 | "fields": [ 771 | { 772 | "name": "token", 773 | "description": null, 774 | "args": [], 775 | "type": { 776 | "kind": "SCALAR", 777 | "name": "String", 778 | "ofType": null 779 | }, 780 | "isDeprecated": false, 781 | "deprecationReason": null 782 | }, 783 | { 784 | "name": "error", 785 | "description": null, 786 | "args": [], 787 | "type": { 788 | "kind": "SCALAR", 789 | "name": "String", 790 | "ofType": null 791 | }, 792 | "isDeprecated": false, 793 | "deprecationReason": null 794 | }, 795 | { 796 | "name": "clientMutationId", 797 | "description": null, 798 | "args": [], 799 | "type": { 800 | "kind": "SCALAR", 801 | "name": "String", 802 | "ofType": null 803 | }, 804 | "isDeprecated": false, 805 | "deprecationReason": null 806 | } 807 | ], 808 | "inputFields": null, 809 | "interfaces": [], 810 | "enumValues": null, 811 | "possibleTypes": null 812 | }, 813 | { 814 | "kind": "INPUT_OBJECT", 815 | "name": "UserRegisterWithEmailInput", 816 | "description": null, 817 | "fields": null, 818 | "inputFields": [ 819 | { 820 | "name": "name", 821 | "description": null, 822 | "type": { 823 | "kind": "NON_NULL", 824 | "name": null, 825 | "ofType": { 826 | "kind": "SCALAR", 827 | "name": "String", 828 | "ofType": null 829 | } 830 | }, 831 | "defaultValue": null 832 | }, 833 | { 834 | "name": "email", 835 | "description": null, 836 | "type": { 837 | "kind": "NON_NULL", 838 | "name": null, 839 | "ofType": { 840 | "kind": "SCALAR", 841 | "name": "String", 842 | "ofType": null 843 | } 844 | }, 845 | "defaultValue": null 846 | }, 847 | { 848 | "name": "password", 849 | "description": null, 850 | "type": { 851 | "kind": "NON_NULL", 852 | "name": null, 853 | "ofType": { 854 | "kind": "SCALAR", 855 | "name": "String", 856 | "ofType": null 857 | } 858 | }, 859 | "defaultValue": null 860 | }, 861 | { 862 | "name": "clientMutationId", 863 | "description": null, 864 | "type": { 865 | "kind": "SCALAR", 866 | "name": "String", 867 | "ofType": null 868 | }, 869 | "defaultValue": null 870 | } 871 | ], 872 | "interfaces": null, 873 | "enumValues": null, 874 | "possibleTypes": null 875 | }, 876 | { 877 | "kind": "OBJECT", 878 | "name": "UserRegisterWithEmailPayload", 879 | "description": null, 880 | "fields": [ 881 | { 882 | "name": "token", 883 | "description": null, 884 | "args": [], 885 | "type": { 886 | "kind": "SCALAR", 887 | "name": "String", 888 | "ofType": null 889 | }, 890 | "isDeprecated": false, 891 | "deprecationReason": null 892 | }, 893 | { 894 | "name": "error", 895 | "description": null, 896 | "args": [], 897 | "type": { 898 | "kind": "SCALAR", 899 | "name": "String", 900 | "ofType": null 901 | }, 902 | "isDeprecated": false, 903 | "deprecationReason": null 904 | }, 905 | { 906 | "name": "clientMutationId", 907 | "description": null, 908 | "args": [], 909 | "type": { 910 | "kind": "SCALAR", 911 | "name": "String", 912 | "ofType": null 913 | }, 914 | "isDeprecated": false, 915 | "deprecationReason": null 916 | } 917 | ], 918 | "inputFields": null, 919 | "interfaces": [], 920 | "enumValues": null, 921 | "possibleTypes": null 922 | }, 923 | { 924 | "kind": "OBJECT", 925 | "name": "Subscription", 926 | "description": null, 927 | "fields": [ 928 | { 929 | "name": "UserAdded", 930 | "description": null, 931 | "args": [], 932 | "type": { 933 | "kind": "OBJECT", 934 | "name": "UserAddedPayload", 935 | "ofType": null 936 | }, 937 | "isDeprecated": false, 938 | "deprecationReason": null 939 | } 940 | ], 941 | "inputFields": null, 942 | "interfaces": [], 943 | "enumValues": null, 944 | "possibleTypes": null 945 | }, 946 | { 947 | "kind": "OBJECT", 948 | "name": "UserAddedPayload", 949 | "description": null, 950 | "fields": [ 951 | { 952 | "name": "userEdge", 953 | "description": null, 954 | "args": [], 955 | "type": { 956 | "kind": "OBJECT", 957 | "name": "UserEdge", 958 | "ofType": null 959 | }, 960 | "isDeprecated": false, 961 | "deprecationReason": null 962 | } 963 | ], 964 | "inputFields": null, 965 | "interfaces": [], 966 | "enumValues": null, 967 | "possibleTypes": null 968 | }, 969 | { 970 | "kind": "OBJECT", 971 | "name": "__Schema", 972 | "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", 973 | "fields": [ 974 | { 975 | "name": "types", 976 | "description": "A list of all types supported by this server.", 977 | "args": [], 978 | "type": { 979 | "kind": "NON_NULL", 980 | "name": null, 981 | "ofType": { 982 | "kind": "LIST", 983 | "name": null, 984 | "ofType": { 985 | "kind": "NON_NULL", 986 | "name": null, 987 | "ofType": { 988 | "kind": "OBJECT", 989 | "name": "__Type", 990 | "ofType": null 991 | } 992 | } 993 | } 994 | }, 995 | "isDeprecated": false, 996 | "deprecationReason": null 997 | }, 998 | { 999 | "name": "queryType", 1000 | "description": "The type that query operations will be rooted at.", 1001 | "args": [], 1002 | "type": { 1003 | "kind": "NON_NULL", 1004 | "name": null, 1005 | "ofType": { 1006 | "kind": "OBJECT", 1007 | "name": "__Type", 1008 | "ofType": null 1009 | } 1010 | }, 1011 | "isDeprecated": false, 1012 | "deprecationReason": null 1013 | }, 1014 | { 1015 | "name": "mutationType", 1016 | "description": "If this server supports mutation, the type that mutation operations will be rooted at.", 1017 | "args": [], 1018 | "type": { 1019 | "kind": "OBJECT", 1020 | "name": "__Type", 1021 | "ofType": null 1022 | }, 1023 | "isDeprecated": false, 1024 | "deprecationReason": null 1025 | }, 1026 | { 1027 | "name": "subscriptionType", 1028 | "description": "If this server support subscription, the type that subscription operations will be rooted at.", 1029 | "args": [], 1030 | "type": { 1031 | "kind": "OBJECT", 1032 | "name": "__Type", 1033 | "ofType": null 1034 | }, 1035 | "isDeprecated": false, 1036 | "deprecationReason": null 1037 | }, 1038 | { 1039 | "name": "directives", 1040 | "description": "A list of all directives supported by this server.", 1041 | "args": [], 1042 | "type": { 1043 | "kind": "NON_NULL", 1044 | "name": null, 1045 | "ofType": { 1046 | "kind": "LIST", 1047 | "name": null, 1048 | "ofType": { 1049 | "kind": "NON_NULL", 1050 | "name": null, 1051 | "ofType": { 1052 | "kind": "OBJECT", 1053 | "name": "__Directive", 1054 | "ofType": null 1055 | } 1056 | } 1057 | } 1058 | }, 1059 | "isDeprecated": false, 1060 | "deprecationReason": null 1061 | } 1062 | ], 1063 | "inputFields": null, 1064 | "interfaces": [], 1065 | "enumValues": null, 1066 | "possibleTypes": null 1067 | }, 1068 | { 1069 | "kind": "OBJECT", 1070 | "name": "__Type", 1071 | "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", 1072 | "fields": [ 1073 | { 1074 | "name": "kind", 1075 | "description": null, 1076 | "args": [], 1077 | "type": { 1078 | "kind": "NON_NULL", 1079 | "name": null, 1080 | "ofType": { 1081 | "kind": "ENUM", 1082 | "name": "__TypeKind", 1083 | "ofType": null 1084 | } 1085 | }, 1086 | "isDeprecated": false, 1087 | "deprecationReason": null 1088 | }, 1089 | { 1090 | "name": "name", 1091 | "description": null, 1092 | "args": [], 1093 | "type": { 1094 | "kind": "SCALAR", 1095 | "name": "String", 1096 | "ofType": null 1097 | }, 1098 | "isDeprecated": false, 1099 | "deprecationReason": null 1100 | }, 1101 | { 1102 | "name": "description", 1103 | "description": null, 1104 | "args": [], 1105 | "type": { 1106 | "kind": "SCALAR", 1107 | "name": "String", 1108 | "ofType": null 1109 | }, 1110 | "isDeprecated": false, 1111 | "deprecationReason": null 1112 | }, 1113 | { 1114 | "name": "fields", 1115 | "description": null, 1116 | "args": [ 1117 | { 1118 | "name": "includeDeprecated", 1119 | "description": null, 1120 | "type": { 1121 | "kind": "SCALAR", 1122 | "name": "Boolean", 1123 | "ofType": null 1124 | }, 1125 | "defaultValue": "false" 1126 | } 1127 | ], 1128 | "type": { 1129 | "kind": "LIST", 1130 | "name": null, 1131 | "ofType": { 1132 | "kind": "NON_NULL", 1133 | "name": null, 1134 | "ofType": { 1135 | "kind": "OBJECT", 1136 | "name": "__Field", 1137 | "ofType": null 1138 | } 1139 | } 1140 | }, 1141 | "isDeprecated": false, 1142 | "deprecationReason": null 1143 | }, 1144 | { 1145 | "name": "interfaces", 1146 | "description": null, 1147 | "args": [], 1148 | "type": { 1149 | "kind": "LIST", 1150 | "name": null, 1151 | "ofType": { 1152 | "kind": "NON_NULL", 1153 | "name": null, 1154 | "ofType": { 1155 | "kind": "OBJECT", 1156 | "name": "__Type", 1157 | "ofType": null 1158 | } 1159 | } 1160 | }, 1161 | "isDeprecated": false, 1162 | "deprecationReason": null 1163 | }, 1164 | { 1165 | "name": "possibleTypes", 1166 | "description": null, 1167 | "args": [], 1168 | "type": { 1169 | "kind": "LIST", 1170 | "name": null, 1171 | "ofType": { 1172 | "kind": "NON_NULL", 1173 | "name": null, 1174 | "ofType": { 1175 | "kind": "OBJECT", 1176 | "name": "__Type", 1177 | "ofType": null 1178 | } 1179 | } 1180 | }, 1181 | "isDeprecated": false, 1182 | "deprecationReason": null 1183 | }, 1184 | { 1185 | "name": "enumValues", 1186 | "description": null, 1187 | "args": [ 1188 | { 1189 | "name": "includeDeprecated", 1190 | "description": null, 1191 | "type": { 1192 | "kind": "SCALAR", 1193 | "name": "Boolean", 1194 | "ofType": null 1195 | }, 1196 | "defaultValue": "false" 1197 | } 1198 | ], 1199 | "type": { 1200 | "kind": "LIST", 1201 | "name": null, 1202 | "ofType": { 1203 | "kind": "NON_NULL", 1204 | "name": null, 1205 | "ofType": { 1206 | "kind": "OBJECT", 1207 | "name": "__EnumValue", 1208 | "ofType": null 1209 | } 1210 | } 1211 | }, 1212 | "isDeprecated": false, 1213 | "deprecationReason": null 1214 | }, 1215 | { 1216 | "name": "inputFields", 1217 | "description": null, 1218 | "args": [], 1219 | "type": { 1220 | "kind": "LIST", 1221 | "name": null, 1222 | "ofType": { 1223 | "kind": "NON_NULL", 1224 | "name": null, 1225 | "ofType": { 1226 | "kind": "OBJECT", 1227 | "name": "__InputValue", 1228 | "ofType": null 1229 | } 1230 | } 1231 | }, 1232 | "isDeprecated": false, 1233 | "deprecationReason": null 1234 | }, 1235 | { 1236 | "name": "ofType", 1237 | "description": null, 1238 | "args": [], 1239 | "type": { 1240 | "kind": "OBJECT", 1241 | "name": "__Type", 1242 | "ofType": null 1243 | }, 1244 | "isDeprecated": false, 1245 | "deprecationReason": null 1246 | } 1247 | ], 1248 | "inputFields": null, 1249 | "interfaces": [], 1250 | "enumValues": null, 1251 | "possibleTypes": null 1252 | }, 1253 | { 1254 | "kind": "ENUM", 1255 | "name": "__TypeKind", 1256 | "description": "An enum describing what kind of type a given `__Type` is.", 1257 | "fields": null, 1258 | "inputFields": null, 1259 | "interfaces": null, 1260 | "enumValues": [ 1261 | { 1262 | "name": "SCALAR", 1263 | "description": "Indicates this type is a scalar.", 1264 | "isDeprecated": false, 1265 | "deprecationReason": null 1266 | }, 1267 | { 1268 | "name": "OBJECT", 1269 | "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", 1270 | "isDeprecated": false, 1271 | "deprecationReason": null 1272 | }, 1273 | { 1274 | "name": "INTERFACE", 1275 | "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", 1276 | "isDeprecated": false, 1277 | "deprecationReason": null 1278 | }, 1279 | { 1280 | "name": "UNION", 1281 | "description": "Indicates this type is a union. `possibleTypes` is a valid field.", 1282 | "isDeprecated": false, 1283 | "deprecationReason": null 1284 | }, 1285 | { 1286 | "name": "ENUM", 1287 | "description": "Indicates this type is an enum. `enumValues` is a valid field.", 1288 | "isDeprecated": false, 1289 | "deprecationReason": null 1290 | }, 1291 | { 1292 | "name": "INPUT_OBJECT", 1293 | "description": "Indicates this type is an input object. `inputFields` is a valid field.", 1294 | "isDeprecated": false, 1295 | "deprecationReason": null 1296 | }, 1297 | { 1298 | "name": "LIST", 1299 | "description": "Indicates this type is a list. `ofType` is a valid field.", 1300 | "isDeprecated": false, 1301 | "deprecationReason": null 1302 | }, 1303 | { 1304 | "name": "NON_NULL", 1305 | "description": "Indicates this type is a non-null. `ofType` is a valid field.", 1306 | "isDeprecated": false, 1307 | "deprecationReason": null 1308 | } 1309 | ], 1310 | "possibleTypes": null 1311 | }, 1312 | { 1313 | "kind": "OBJECT", 1314 | "name": "__Field", 1315 | "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", 1316 | "fields": [ 1317 | { 1318 | "name": "name", 1319 | "description": null, 1320 | "args": [], 1321 | "type": { 1322 | "kind": "NON_NULL", 1323 | "name": null, 1324 | "ofType": { 1325 | "kind": "SCALAR", 1326 | "name": "String", 1327 | "ofType": null 1328 | } 1329 | }, 1330 | "isDeprecated": false, 1331 | "deprecationReason": null 1332 | }, 1333 | { 1334 | "name": "description", 1335 | "description": null, 1336 | "args": [], 1337 | "type": { 1338 | "kind": "SCALAR", 1339 | "name": "String", 1340 | "ofType": null 1341 | }, 1342 | "isDeprecated": false, 1343 | "deprecationReason": null 1344 | }, 1345 | { 1346 | "name": "args", 1347 | "description": null, 1348 | "args": [], 1349 | "type": { 1350 | "kind": "NON_NULL", 1351 | "name": null, 1352 | "ofType": { 1353 | "kind": "LIST", 1354 | "name": null, 1355 | "ofType": { 1356 | "kind": "NON_NULL", 1357 | "name": null, 1358 | "ofType": { 1359 | "kind": "OBJECT", 1360 | "name": "__InputValue", 1361 | "ofType": null 1362 | } 1363 | } 1364 | } 1365 | }, 1366 | "isDeprecated": false, 1367 | "deprecationReason": null 1368 | }, 1369 | { 1370 | "name": "type", 1371 | "description": null, 1372 | "args": [], 1373 | "type": { 1374 | "kind": "NON_NULL", 1375 | "name": null, 1376 | "ofType": { 1377 | "kind": "OBJECT", 1378 | "name": "__Type", 1379 | "ofType": null 1380 | } 1381 | }, 1382 | "isDeprecated": false, 1383 | "deprecationReason": null 1384 | }, 1385 | { 1386 | "name": "isDeprecated", 1387 | "description": null, 1388 | "args": [], 1389 | "type": { 1390 | "kind": "NON_NULL", 1391 | "name": null, 1392 | "ofType": { 1393 | "kind": "SCALAR", 1394 | "name": "Boolean", 1395 | "ofType": null 1396 | } 1397 | }, 1398 | "isDeprecated": false, 1399 | "deprecationReason": null 1400 | }, 1401 | { 1402 | "name": "deprecationReason", 1403 | "description": null, 1404 | "args": [], 1405 | "type": { 1406 | "kind": "SCALAR", 1407 | "name": "String", 1408 | "ofType": null 1409 | }, 1410 | "isDeprecated": false, 1411 | "deprecationReason": null 1412 | } 1413 | ], 1414 | "inputFields": null, 1415 | "interfaces": [], 1416 | "enumValues": null, 1417 | "possibleTypes": null 1418 | }, 1419 | { 1420 | "kind": "OBJECT", 1421 | "name": "__InputValue", 1422 | "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", 1423 | "fields": [ 1424 | { 1425 | "name": "name", 1426 | "description": null, 1427 | "args": [], 1428 | "type": { 1429 | "kind": "NON_NULL", 1430 | "name": null, 1431 | "ofType": { 1432 | "kind": "SCALAR", 1433 | "name": "String", 1434 | "ofType": null 1435 | } 1436 | }, 1437 | "isDeprecated": false, 1438 | "deprecationReason": null 1439 | }, 1440 | { 1441 | "name": "description", 1442 | "description": null, 1443 | "args": [], 1444 | "type": { 1445 | "kind": "SCALAR", 1446 | "name": "String", 1447 | "ofType": null 1448 | }, 1449 | "isDeprecated": false, 1450 | "deprecationReason": null 1451 | }, 1452 | { 1453 | "name": "type", 1454 | "description": null, 1455 | "args": [], 1456 | "type": { 1457 | "kind": "NON_NULL", 1458 | "name": null, 1459 | "ofType": { 1460 | "kind": "OBJECT", 1461 | "name": "__Type", 1462 | "ofType": null 1463 | } 1464 | }, 1465 | "isDeprecated": false, 1466 | "deprecationReason": null 1467 | }, 1468 | { 1469 | "name": "defaultValue", 1470 | "description": "A GraphQL-formatted string representing the default value for this input value.", 1471 | "args": [], 1472 | "type": { 1473 | "kind": "SCALAR", 1474 | "name": "String", 1475 | "ofType": null 1476 | }, 1477 | "isDeprecated": false, 1478 | "deprecationReason": null 1479 | } 1480 | ], 1481 | "inputFields": null, 1482 | "interfaces": [], 1483 | "enumValues": null, 1484 | "possibleTypes": null 1485 | }, 1486 | { 1487 | "kind": "OBJECT", 1488 | "name": "__EnumValue", 1489 | "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", 1490 | "fields": [ 1491 | { 1492 | "name": "name", 1493 | "description": null, 1494 | "args": [], 1495 | "type": { 1496 | "kind": "NON_NULL", 1497 | "name": null, 1498 | "ofType": { 1499 | "kind": "SCALAR", 1500 | "name": "String", 1501 | "ofType": null 1502 | } 1503 | }, 1504 | "isDeprecated": false, 1505 | "deprecationReason": null 1506 | }, 1507 | { 1508 | "name": "description", 1509 | "description": null, 1510 | "args": [], 1511 | "type": { 1512 | "kind": "SCALAR", 1513 | "name": "String", 1514 | "ofType": null 1515 | }, 1516 | "isDeprecated": false, 1517 | "deprecationReason": null 1518 | }, 1519 | { 1520 | "name": "isDeprecated", 1521 | "description": null, 1522 | "args": [], 1523 | "type": { 1524 | "kind": "NON_NULL", 1525 | "name": null, 1526 | "ofType": { 1527 | "kind": "SCALAR", 1528 | "name": "Boolean", 1529 | "ofType": null 1530 | } 1531 | }, 1532 | "isDeprecated": false, 1533 | "deprecationReason": null 1534 | }, 1535 | { 1536 | "name": "deprecationReason", 1537 | "description": null, 1538 | "args": [], 1539 | "type": { 1540 | "kind": "SCALAR", 1541 | "name": "String", 1542 | "ofType": null 1543 | }, 1544 | "isDeprecated": false, 1545 | "deprecationReason": null 1546 | } 1547 | ], 1548 | "inputFields": null, 1549 | "interfaces": [], 1550 | "enumValues": null, 1551 | "possibleTypes": null 1552 | }, 1553 | { 1554 | "kind": "OBJECT", 1555 | "name": "__Directive", 1556 | "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", 1557 | "fields": [ 1558 | { 1559 | "name": "name", 1560 | "description": null, 1561 | "args": [], 1562 | "type": { 1563 | "kind": "NON_NULL", 1564 | "name": null, 1565 | "ofType": { 1566 | "kind": "SCALAR", 1567 | "name": "String", 1568 | "ofType": null 1569 | } 1570 | }, 1571 | "isDeprecated": false, 1572 | "deprecationReason": null 1573 | }, 1574 | { 1575 | "name": "description", 1576 | "description": null, 1577 | "args": [], 1578 | "type": { 1579 | "kind": "SCALAR", 1580 | "name": "String", 1581 | "ofType": null 1582 | }, 1583 | "isDeprecated": false, 1584 | "deprecationReason": null 1585 | }, 1586 | { 1587 | "name": "locations", 1588 | "description": null, 1589 | "args": [], 1590 | "type": { 1591 | "kind": "NON_NULL", 1592 | "name": null, 1593 | "ofType": { 1594 | "kind": "LIST", 1595 | "name": null, 1596 | "ofType": { 1597 | "kind": "NON_NULL", 1598 | "name": null, 1599 | "ofType": { 1600 | "kind": "ENUM", 1601 | "name": "__DirectiveLocation", 1602 | "ofType": null 1603 | } 1604 | } 1605 | } 1606 | }, 1607 | "isDeprecated": false, 1608 | "deprecationReason": null 1609 | }, 1610 | { 1611 | "name": "args", 1612 | "description": null, 1613 | "args": [], 1614 | "type": { 1615 | "kind": "NON_NULL", 1616 | "name": null, 1617 | "ofType": { 1618 | "kind": "LIST", 1619 | "name": null, 1620 | "ofType": { 1621 | "kind": "NON_NULL", 1622 | "name": null, 1623 | "ofType": { 1624 | "kind": "OBJECT", 1625 | "name": "__InputValue", 1626 | "ofType": null 1627 | } 1628 | } 1629 | } 1630 | }, 1631 | "isDeprecated": false, 1632 | "deprecationReason": null 1633 | }, 1634 | { 1635 | "name": "onOperation", 1636 | "description": null, 1637 | "args": [], 1638 | "type": { 1639 | "kind": "NON_NULL", 1640 | "name": null, 1641 | "ofType": { 1642 | "kind": "SCALAR", 1643 | "name": "Boolean", 1644 | "ofType": null 1645 | } 1646 | }, 1647 | "isDeprecated": true, 1648 | "deprecationReason": "Use `locations`." 1649 | }, 1650 | { 1651 | "name": "onFragment", 1652 | "description": null, 1653 | "args": [], 1654 | "type": { 1655 | "kind": "NON_NULL", 1656 | "name": null, 1657 | "ofType": { 1658 | "kind": "SCALAR", 1659 | "name": "Boolean", 1660 | "ofType": null 1661 | } 1662 | }, 1663 | "isDeprecated": true, 1664 | "deprecationReason": "Use `locations`." 1665 | }, 1666 | { 1667 | "name": "onField", 1668 | "description": null, 1669 | "args": [], 1670 | "type": { 1671 | "kind": "NON_NULL", 1672 | "name": null, 1673 | "ofType": { 1674 | "kind": "SCALAR", 1675 | "name": "Boolean", 1676 | "ofType": null 1677 | } 1678 | }, 1679 | "isDeprecated": true, 1680 | "deprecationReason": "Use `locations`." 1681 | } 1682 | ], 1683 | "inputFields": null, 1684 | "interfaces": [], 1685 | "enumValues": null, 1686 | "possibleTypes": null 1687 | }, 1688 | { 1689 | "kind": "ENUM", 1690 | "name": "__DirectiveLocation", 1691 | "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", 1692 | "fields": null, 1693 | "inputFields": null, 1694 | "interfaces": null, 1695 | "enumValues": [ 1696 | { 1697 | "name": "QUERY", 1698 | "description": "Location adjacent to a query operation.", 1699 | "isDeprecated": false, 1700 | "deprecationReason": null 1701 | }, 1702 | { 1703 | "name": "MUTATION", 1704 | "description": "Location adjacent to a mutation operation.", 1705 | "isDeprecated": false, 1706 | "deprecationReason": null 1707 | }, 1708 | { 1709 | "name": "SUBSCRIPTION", 1710 | "description": "Location adjacent to a subscription operation.", 1711 | "isDeprecated": false, 1712 | "deprecationReason": null 1713 | }, 1714 | { 1715 | "name": "FIELD", 1716 | "description": "Location adjacent to a field.", 1717 | "isDeprecated": false, 1718 | "deprecationReason": null 1719 | }, 1720 | { 1721 | "name": "FRAGMENT_DEFINITION", 1722 | "description": "Location adjacent to a fragment definition.", 1723 | "isDeprecated": false, 1724 | "deprecationReason": null 1725 | }, 1726 | { 1727 | "name": "FRAGMENT_SPREAD", 1728 | "description": "Location adjacent to a fragment spread.", 1729 | "isDeprecated": false, 1730 | "deprecationReason": null 1731 | }, 1732 | { 1733 | "name": "INLINE_FRAGMENT", 1734 | "description": "Location adjacent to an inline fragment.", 1735 | "isDeprecated": false, 1736 | "deprecationReason": null 1737 | }, 1738 | { 1739 | "name": "SCHEMA", 1740 | "description": "Location adjacent to a schema definition.", 1741 | "isDeprecated": false, 1742 | "deprecationReason": null 1743 | }, 1744 | { 1745 | "name": "SCALAR", 1746 | "description": "Location adjacent to a scalar definition.", 1747 | "isDeprecated": false, 1748 | "deprecationReason": null 1749 | }, 1750 | { 1751 | "name": "OBJECT", 1752 | "description": "Location adjacent to an object type definition.", 1753 | "isDeprecated": false, 1754 | "deprecationReason": null 1755 | }, 1756 | { 1757 | "name": "FIELD_DEFINITION", 1758 | "description": "Location adjacent to a field definition.", 1759 | "isDeprecated": false, 1760 | "deprecationReason": null 1761 | }, 1762 | { 1763 | "name": "ARGUMENT_DEFINITION", 1764 | "description": "Location adjacent to an argument definition.", 1765 | "isDeprecated": false, 1766 | "deprecationReason": null 1767 | }, 1768 | { 1769 | "name": "INTERFACE", 1770 | "description": "Location adjacent to an interface definition.", 1771 | "isDeprecated": false, 1772 | "deprecationReason": null 1773 | }, 1774 | { 1775 | "name": "UNION", 1776 | "description": "Location adjacent to a union definition.", 1777 | "isDeprecated": false, 1778 | "deprecationReason": null 1779 | }, 1780 | { 1781 | "name": "ENUM", 1782 | "description": "Location adjacent to an enum definition.", 1783 | "isDeprecated": false, 1784 | "deprecationReason": null 1785 | }, 1786 | { 1787 | "name": "ENUM_VALUE", 1788 | "description": "Location adjacent to an enum value definition.", 1789 | "isDeprecated": false, 1790 | "deprecationReason": null 1791 | }, 1792 | { 1793 | "name": "INPUT_OBJECT", 1794 | "description": "Location adjacent to an input object type definition.", 1795 | "isDeprecated": false, 1796 | "deprecationReason": null 1797 | }, 1798 | { 1799 | "name": "INPUT_FIELD_DEFINITION", 1800 | "description": "Location adjacent to an input object field definition.", 1801 | "isDeprecated": false, 1802 | "deprecationReason": null 1803 | } 1804 | ], 1805 | "possibleTypes": null 1806 | } 1807 | ], 1808 | "directives": [ 1809 | { 1810 | "name": "include", 1811 | "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", 1812 | "locations": [ 1813 | "FIELD", 1814 | "FRAGMENT_SPREAD", 1815 | "INLINE_FRAGMENT" 1816 | ], 1817 | "args": [ 1818 | { 1819 | "name": "if", 1820 | "description": "Included when true.", 1821 | "type": { 1822 | "kind": "NON_NULL", 1823 | "name": null, 1824 | "ofType": { 1825 | "kind": "SCALAR", 1826 | "name": "Boolean", 1827 | "ofType": null 1828 | } 1829 | }, 1830 | "defaultValue": null 1831 | } 1832 | ] 1833 | }, 1834 | { 1835 | "name": "skip", 1836 | "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", 1837 | "locations": [ 1838 | "FIELD", 1839 | "FRAGMENT_SPREAD", 1840 | "INLINE_FRAGMENT" 1841 | ], 1842 | "args": [ 1843 | { 1844 | "name": "if", 1845 | "description": "Skipped when true.", 1846 | "type": { 1847 | "kind": "NON_NULL", 1848 | "name": null, 1849 | "ofType": { 1850 | "kind": "SCALAR", 1851 | "name": "Boolean", 1852 | "ofType": null 1853 | } 1854 | }, 1855 | "defaultValue": null 1856 | } 1857 | ] 1858 | }, 1859 | { 1860 | "name": "deprecated", 1861 | "description": "Marks an element of a GraphQL schema as no longer supported.", 1862 | "locations": [ 1863 | "FIELD_DEFINITION", 1864 | "ENUM_VALUE" 1865 | ], 1866 | "args": [ 1867 | { 1868 | "name": "reason", 1869 | "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).", 1870 | "type": { 1871 | "kind": "SCALAR", 1872 | "name": "String", 1873 | "ofType": null 1874 | }, 1875 | "defaultValue": "\"No longer supported\"" 1876 | } 1877 | ] 1878 | } 1879 | ] 1880 | } 1881 | } 1882 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cra-relay", 3 | "version": "0.1.0", 4 | "browserslist": [ 5 | ">0.2%", 6 | "not dead", 7 | "not ie <= 11", 8 | "not op_mini all" 9 | ], 10 | "dependencies": { 11 | "react": "^16.8.2", 12 | "react-dom": "^16.8.2", 13 | "react-relay": "^2.0.0", 14 | "react-scripts": "2.1.5" 15 | }, 16 | "devDependencies": { 17 | "babel-plugin-relay": "^2.0.0", 18 | "graphql": "^14.1.1", 19 | "relay-compiler": "^2.0.0" 20 | }, 21 | "eslintConfig": { 22 | "extends": "react-app" 23 | }, 24 | "private": true, 25 | "scripts": { 26 | "build": "react-scripts build", 27 | "eject": "react-scripts eject", 28 | "relay": "relay-compiler --src ./src --schema ./data/schema.graphql", 29 | "start": "react-scripts start", 30 | "test": "react-scripts test" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sibelius/create-react-app-relay-modern/2947a45a240886a36b67271cde90f26cf57e1777/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 10 | 11 | 15 | 16 | 25 |
12 | Edit src/App.js
and save to reload.
13 |