Skip to content

Commit 3f476ec

Browse files
authored
Update GraphQL Docs with the latest changes (parse-community#5980)
1 parent 4d99726 commit 3f476ec

File tree

1 file changed

+28
-40
lines changed

1 file changed

+28
-40
lines changed

README.md

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,9 @@ Since your application does not have a schema yet, you can use the generic `crea
510510

511511
```graphql
512512
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
518516
}
519517
}
520518
```
@@ -524,11 +522,9 @@ You should receive a response similar to this:
524522
```json
525523
{
526524
"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"
532528
}
533529
}
534530
}
@@ -542,11 +538,9 @@ Run the following to create a second object:
542538

543539
```graphql
544540
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
550544
}
551545
}
552546
```
@@ -556,11 +550,9 @@ You should receive a response similar to this:
556550
```json
557551
{
558552
"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"
564556
}
565557
}
566558
}
@@ -569,13 +561,11 @@ You should receive a response similar to this:
569561
You can also run a query to this new class:
570562

571563
```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
579569
}
580570
}
581571
}
@@ -586,19 +576,17 @@ You should receive a response similar to this:
586576
```json
587577
{
588578
"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+
]
602590
}
603591
}
604592
}

0 commit comments

Comments
 (0)