Update GraphQL Docs with the latest changes (#5980)

This commit is contained in:
Antonio Davi Macedo Coelho de Castro
2019-08-27 14:18:15 -07:00
committed by GitHub
parent 328b7bae41
commit 251d454dcd

View File

@@ -510,13 +510,11 @@ Since your application does not have a schema yet, you can use the generic `crea
```graphql
mutation CreateObject {
objects {
create(className: "GameScore" fields: { score: 1337 playerName: "Sean Plott" cheatMode: false }) {
objectId
createdAt
}
}
}
```
You should receive a response similar to this:
@@ -524,11 +522,9 @@ You should receive a response similar to this:
```json
{
"data": {
"objects": {
"create": {
"objectId": "7jfBmbGgyF",
"createdAt": "2019-06-20T23:50:50.825Z"
}
"objectId": "CVuh0o0ioY",
"createdAt": "2019-08-27T06:35:15.641Z"
}
}
}
@@ -542,13 +538,11 @@ Run the following to create a second object:
```graphql
mutation CreateGameScore {
objects {
createGameScore(fields: { score: 2558 playerName: "Luke Skywalker" cheatMode: false }) {
objectId
createdAt
}
}
}
```
You should receive a response similar to this:
@@ -556,11 +550,9 @@ You should receive a response similar to this:
```json
{
"data": {
"objects": {
"createGameScore": {
"objectId": "gySYolb2CL",
"createdAt": "2019-06-20T23:56:37.114Z"
}
"objectId": "XyvErLoJ2O",
"createdAt": "2019-08-27T06:37:32.078Z"
}
}
}
@@ -569,16 +561,14 @@ You should receive a response similar to this:
You can also run a query to this new class:
```graphql
query FindGameScore {
objects {
findGameScore {
query GameScores {
gameScores {
results {
playerName
score
}
}
}
}
```
You should receive a response similar to this:
@@ -586,8 +576,7 @@ You should receive a response similar to this:
```json
{
"data": {
"objects": {
"findGameScore": {
"gameScores": {
"results": [
{
"playerName": "Sean Plott",
@@ -601,7 +590,6 @@ You should receive a response similar to this:
}
}
}
}
```
## Customizing your GraphQL Schema