Update GraphQL Docs with the latest changes (#5980)
This commit is contained in:
committed by
GitHub
parent
328b7bae41
commit
251d454dcd
68
README.md
68
README.md
@@ -510,11 +510,9 @@ Since your application does not have a schema yet, you can use the generic `crea
|
|||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
mutation CreateObject {
|
mutation CreateObject {
|
||||||
objects {
|
create(className: "GameScore" fields: { score: 1337 playerName: "Sean Plott" cheatMode: false }) {
|
||||||
create(className: "GameScore" fields: { score: 1337 playerName: "Sean Plott" cheatMode: false }) {
|
objectId
|
||||||
objectId
|
createdAt
|
||||||
createdAt
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -524,11 +522,9 @@ You should receive a response similar to this:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"objects": {
|
"create": {
|
||||||
"create": {
|
"objectId": "CVuh0o0ioY",
|
||||||
"objectId": "7jfBmbGgyF",
|
"createdAt": "2019-08-27T06:35:15.641Z"
|
||||||
"createdAt": "2019-06-20T23:50:50.825Z"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -542,11 +538,9 @@ Run the following to create a second object:
|
|||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
mutation CreateGameScore {
|
mutation CreateGameScore {
|
||||||
objects {
|
createGameScore(fields: { score: 2558 playerName: "Luke Skywalker" cheatMode: false }) {
|
||||||
createGameScore(fields: { score: 2558 playerName: "Luke Skywalker" cheatMode: false }) {
|
objectId
|
||||||
objectId
|
createdAt
|
||||||
createdAt
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -556,11 +550,9 @@ You should receive a response similar to this:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"objects": {
|
"createGameScore": {
|
||||||
"createGameScore": {
|
"objectId": "XyvErLoJ2O",
|
||||||
"objectId": "gySYolb2CL",
|
"createdAt": "2019-08-27T06:37:32.078Z"
|
||||||
"createdAt": "2019-06-20T23:56:37.114Z"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -569,13 +561,11 @@ You should receive a response similar to this:
|
|||||||
You can also run a query to this new class:
|
You can also run a query to this new class:
|
||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
query FindGameScore {
|
query GameScores {
|
||||||
objects {
|
gameScores {
|
||||||
findGameScore {
|
results {
|
||||||
results {
|
playerName
|
||||||
playerName
|
score
|
||||||
score
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -586,19 +576,17 @@ You should receive a response similar to this:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"objects": {
|
"gameScores": {
|
||||||
"findGameScore": {
|
"results": [
|
||||||
"results": [
|
{
|
||||||
{
|
"playerName": "Sean Plott",
|
||||||
"playerName": "Sean Plott",
|
"score": 1337
|
||||||
"score": 1337
|
},
|
||||||
},
|
{
|
||||||
{
|
"playerName": "Luke Skywalker",
|
||||||
"playerName": "Luke Skywalker",
|
"score": 2558
|
||||||
"score": 2558
|
}
|
||||||
}
|
]
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user