Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update graphql_cookbook.md #2235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions pages/apis/graphql/graphql_cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,80 @@ mutation {
}
}
```
## Clusters

A collection of common tasks with clusters using the GraphQL API
Comment on lines +543 to +545
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, coordinate this with #2329. I think that one will merge first.


### Create a queue

Creates a new queue in a cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: Make this a full sentence and use punctuation to link it to the example.

Suggested change
Creates a new queue in a cluster
Create a new queue in a cluster using the following call:

^ This applies to each entry.


```graphql
mutation {
clusterQueueCreate(input: {
organizationId: "T3JnYW5pemF0aW9uLS0tZDZmNzU1NTEtZTM2OC00NzNmLTk1YzctNmFlOWU1OTNkOWU2",
clusterId: "Q2x1c3Rlci0tLWU3YWFjN2Q3LTg2ZmYtNDJjZi04NzYyLTM0ZjAwY2Q5MWRkOQ=="
key: "Default",
description: "The default queue"
Comment on lines +554 to +557
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it clearer that these values need to be replaced:

Suggested change
organizationId: "T3JnYW5pemF0aW9uLS0tZDZmNzU1NTEtZTM2OC00NzNmLTk1YzctNmFlOWU1OTNkOWU2",
clusterId: "Q2x1c3Rlci0tLWU3YWFjN2Q3LTg2ZmYtNDJjZi04NzYyLTM0ZjAwY2Q5MWRkOQ=="
key: "Default",
description: "The default queue"
organizationId: "org-id",
clusterId: "cluster-id"
key: "queue-key",
description: "queue-description"

^ Applies to each entry.

}) {
clusterQueue {
id
key
description
createdBy {
id
name
}
cluster {
id
name
}
}
}
}
```
### Update a queue

Update an already existing queue

```graphql
mutation {
clusterQueueUpdate(input: {
organizationId: "T3JnYW5pemF0aW9uLS0tZDZmNzU1NTEtZTM2OC00NzNmLTk1YzctNmFlOWU1OTNkOWU2",
id: "Q2x1c3RlclF1ZXVlLS0tMWY5NDUzMTgtNzI2Zi00OGExLTg4NGQtZGNkN2NjNGFiN2Jj",
description: "The default queue",

}) {
clusterQueue {
id
key
description
createdBy {
id
name
}
cluster {
id
name
}
}
}
}
```
### Delete a queue

Deletes a queue using the queue id

```graphql
mutation {
clusterQueueDelete(input: {
organizationId: "T3JnYW5pemF0aW9uLS0tZDZmNzU1NTEtZTM2OC00NzNmLTk1YzctNmFlOWU1OTNkOWU2",
id: ""
}) {
deletedClusterQueueId
}
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include a blank line between the codeblock and heading:

Suggested change
```
```

## Organizations

A collection of common tasks with organizations using the GraphQL API.
Expand Down