Skip to content

Commit c87558c

Browse files
authored
Updates queries in README (#22)
* added general purpose queries in readme along with one line description * updated formatting * updated queries as per suggestions * updated queries * added limit to find all traces query * addressed SJ's and Adrian's comments * addressed Adrian's comments * udpated readme as per discussions
1 parent 7c18898 commit c87558c

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

README.md

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,8 @@ Hypertrace GraphQL service serves the GraphQL API which will be used by Hypertra
1212
## Queries
1313
Here are some of the important GraphQL queries:
1414

15-
### 1. Get all traces in provided time range
1615

17-
```graphql
18-
curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d\
19-
'{
20-
traces(
21-
type: API_TRACE
22-
limit: 10
23-
between: {
24-
startTime: "2015-01-01T00:00:00.000Z"
25-
endTime: "2025-01-01T00:00:00.000Z"
26-
}
27-
) {
28-
results {
29-
id
30-
}
31-
}
32-
}'
33-
```
34-
35-
### 2. Verify trace exists
16+
### 1. Verify trace exists
3617

3718
```graphql
3819
curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
@@ -52,14 +33,13 @@ curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
5233
}
5334
]
5435
) {
55-
results {
56-
apiName: attribute(key: "apiName")
57-
}
36+
total
5837
}
5938
}'
6039
```
6140

62-
### 3. Get all service names
41+
42+
### 2. Get all service names
6343

6444
```graphql
6545
curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
@@ -79,7 +59,7 @@ curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
7959
}'
8060
```
8161

82-
### 4. Get all backend names
62+
### 3. Get all backend names
8363

8464
```graphql
8565
curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
@@ -99,7 +79,7 @@ curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
9979
}'
10080
```
10181

102-
### 5. Get all API names
82+
### 4. Get all API names
10383

10484
```graphql
10585
curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
@@ -119,7 +99,7 @@ curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \
11999
}'
120100
```
121101

122-
### 6. Get service and backend dependency graph
102+
### 5. Get service and backend dependency graph
123103

124104
```graphql
125105
curl -s localhost:2020/graphql -H 'Content-Type: application/graphql' -d \

0 commit comments

Comments
 (0)