Skip to content

Commit

Permalink
Properly parse quotes for GraphQl query's session id (#941) [deploy s…
Browse files Browse the repository at this point in the history
…ite]
  • Loading branch information
pujagani committed Jan 24, 2022
1 parent a5c7b8a commit 548fa83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ The structure of grid schema is as follows:

## Querying GraphQL

The best way to query GraphQL is by using `curl` requests. GraphQL allows you to
fetch only the data that you want, nothing more nothing less.
The best way to query GraphQL is by using `curl` requests. The query is interpreted as JSON. Ensure double quotes are properly escaped to avoid unexpected errors.
GraphQL allows you to fetch only the data that you want, nothing more nothing less.

Some of the example GraphQL queries are given below. You can build your own
queries as you like.
queries as you like.

### Querying the number of `maxSession` and `sessionCount` in the grid :

Expand Down Expand Up @@ -154,7 +154,7 @@ curl -X POST -H "Content-Type: application/json" --data '{"query":"{ sessionsInf
### Query to get session information for a given session:

```shell
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: "<session-id>") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: \"<session-id>\") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
```

### Querying the capabilities of each node in the grid :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ curl -X POST -H "Content-Type: application/json" --data '{"query":"{ grid { uri,
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ grid { sessionCount } }"}' -s <LINK_TO_GRAPHQL_ENDPOINT>
```

### グリッドで最大セッション数を取得するためのクエリ
### グリッドで最大セッション数を取得するためのクエリ

```shell
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ grid { maxSession } }"}' -s <LINK_TO_GRAPHQL_ENDPOINT>
```

### グリッド内のすべてのノードのすべてのセッションの詳細を取得するためのクエリ
### グリッド内のすべてのノードのすべてのセッションの詳細を取得するためのクエリ

```shell
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ sessionsInfo { sessions { id, capabilities, startTime, uri, nodeId, nodeId, sessionDurationMillis } } }"}' -s <LINK_TO_GRAPHQL_ENDPOINT>
Expand All @@ -151,7 +151,7 @@ curl -X POST -H "Content-Type: application/json" --data '{"query":"{ sessionsInf
### 特定のセッションのセッション情報を取得するためのクエリ

```shell
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: "<session-id>") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: \"<session-id>\") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
```

### グリッド内の各ノードのcapabilityを照会する
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ curl -X POST -H "Content-Type: application/json" --data '{"query":"{ sessionsInf
### Buscando informação da sessão para uma sessão específica:

```shell
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: "<session-id>") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: \"<session-id>\") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
```

### Buscando os recursos de cada nó na Grid:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ curl -X POST -H "Content-Type: application/json" --data '{"query":"{ sessionsInf
### 查询以获取给定会话的会话信息查询以获取给定会话的会话信息 :

```shell
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: "<session-id>") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
curl -X POST -H "Content-Type: application/json" --data '{"query":"{ session (id: \"<session-id>\") { id, capabilities, startTime, uri, nodeId, nodeUri, sessionDurationMillis, slot { id, stereotype, lastStarted } } } "}' -s <LINK_TO_GRAPHQL_ENDPOINT>
```

### 查询网格中每个节点的功能 :
Expand Down

0 comments on commit 548fa83

Please sign in to comment.