@@ -510,11 +510,9 @@ Since your application does not have a schema yet, you can use the generic `crea
510
510
511
511
``` graphql
512
512
mutation CreateObject {
513
- objects {
514
- create (className : " GameScore" fields : { score : 1337 playerName : " Sean Plott" cheatMode : false }) {
515
- objectId
516
- createdAt
517
- }
513
+ create (className : " GameScore" fields : { score : 1337 playerName : " Sean Plott" cheatMode : false }) {
514
+ objectId
515
+ createdAt
518
516
}
519
517
}
520
518
```
@@ -524,11 +522,9 @@ You should receive a response similar to this:
524
522
``` json
525
523
{
526
524
"data" : {
527
- "objects" : {
528
- "create" : {
529
- "objectId" : " 7jfBmbGgyF" ,
530
- "createdAt" : " 2019-06-20T23:50:50.825Z"
531
- }
525
+ "create" : {
526
+ "objectId" : " CVuh0o0ioY" ,
527
+ "createdAt" : " 2019-08-27T06:35:15.641Z"
532
528
}
533
529
}
534
530
}
@@ -542,11 +538,9 @@ Run the following to create a second object:
542
538
543
539
``` graphql
544
540
mutation CreateGameScore {
545
- objects {
546
- createGameScore (fields : { score : 2558 playerName : " Luke Skywalker" cheatMode : false }) {
547
- objectId
548
- createdAt
549
- }
541
+ createGameScore (fields : { score : 2558 playerName : " Luke Skywalker" cheatMode : false }) {
542
+ objectId
543
+ createdAt
550
544
}
551
545
}
552
546
```
@@ -556,11 +550,9 @@ You should receive a response similar to this:
556
550
``` json
557
551
{
558
552
"data" : {
559
- "objects" : {
560
- "createGameScore" : {
561
- "objectId" : " gySYolb2CL" ,
562
- "createdAt" : " 2019-06-20T23:56:37.114Z"
563
- }
553
+ "createGameScore" : {
554
+ "objectId" : " XyvErLoJ2O" ,
555
+ "createdAt" : " 2019-08-27T06:37:32.078Z"
564
556
}
565
557
}
566
558
}
@@ -569,13 +561,11 @@ You should receive a response similar to this:
569
561
You can also run a query to this new class:
570
562
571
563
``` graphql
572
- query FindGameScore {
573
- objects {
574
- findGameScore {
575
- results {
576
- playerName
577
- score
578
- }
564
+ query GameScores {
565
+ gameScores {
566
+ results {
567
+ playerName
568
+ score
579
569
}
580
570
}
581
571
}
@@ -586,19 +576,17 @@ You should receive a response similar to this:
586
576
``` json
587
577
{
588
578
"data" : {
589
- "objects" : {
590
- "findGameScore" : {
591
- "results" : [
592
- {
593
- "playerName" : " Sean Plott" ,
594
- "score" : 1337
595
- },
596
- {
597
- "playerName" : " Luke Skywalker" ,
598
- "score" : 2558
599
- }
600
- ]
601
- }
579
+ "gameScores" : {
580
+ "results" : [
581
+ {
582
+ "playerName" : " Sean Plott" ,
583
+ "score" : 1337
584
+ },
585
+ {
586
+ "playerName" : " Luke Skywalker" ,
587
+ "score" : 2558
588
+ }
589
+ ]
602
590
}
603
591
}
604
592
}
0 commit comments