Skip to content

Commit 4dd3c99

Browse files
committed
PCX-1086 Address comments and edits
1 parent 4e2239c commit 4dd3c99

15 files changed

+59
-33
lines changed

products/analytics/src/content/graphql-api/getting-started/authentication/api-token-auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ When you create a new token, a confirmation page displays that includes your tok
9090

9191
To copy the token to your device's clipboard, click the **Copy** button.
9292

93-
<Aside type='note' header='Note'>
93+
<Aside type='warning' header='Warning'>
9494

95-
The confirmation page is the only time that you can see the token, so make sure you store it safely, since anyone who has the token can use it to access your data.
95+
The token displays only on the confirmation page, so copy the token and store it safely, since anyone who has the token can use it to access your data.
9696

97-
If you lose the secret, you can [regenerate the token from the API Tokens page](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys#12345681), so that you do not have to configure all the permissions again.
97+
If you lose the token, you can [regenerate it from the API Tokens page](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys#12345681), so that you do not have to configure all the permissions again.
9898

9999
</Aside>
100100

products/analytics/src/content/graphql-api/getting-started/compose-graphql-query.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Create a query in a GraphQL client
2+
title: Create a query in GraphiQL
33
order: 50
44
---
55

6-
# Create a query in a GraphQL client
6+
# Create a query in GraphiQL
77

88
You can use a GraphQL client to build and execute queries to the GraphQL API endpoint. The example below uses the [GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme) client.
99

@@ -53,7 +53,7 @@ To display information about the data set, including required parameters, click
5353

5454
Note that the `filter` and `limit` arguments are required, as indicated by the exclamation mark (`!`) after their type definitions (gold text). In this example, the `orderBy` argument is not required, though when used it requires a value of type `ZoneFirewallEventsAdaptiveOrderBy`.
5555

56-
To browse a list of supported filter fields, click the filter type definition (gold text) in the Documentation Explorer. In this example the type is `ZoneFirewallEventsAdaptiveFilter_InputObject`:
56+
To browse a list of supported filter fields, click the filter type definition (gold text) in the Documentation Explorer. In this example, the type is `ZoneFirewallEventsAdaptiveFilter_InputObject`:
5757

5858
![GraphiQL filter fields](../../static/images/graphiql-filter-fields.png)
5959

@@ -77,7 +77,7 @@ This example query returns the `action`, `datetime`, `clientRequestHTTPHost`, an
7777

7878
![Example query with return fields](../../static/images/graphiql-query-return-field-values.png)
7979

80-
Once you have entered all the fields you want your query to return, you can click the **Play** button to submit the query. The response pane contains the data fetched from the Cloudflare GraphQL API endpoint.
80+
Once you have entered all the fields you want your query to return, click the **Play** button to submit the query. The response pane contains the data fetched from the Cloudflare GraphQL API endpoint.
8181

8282
![GraphiQL response](../../static/images/create-query-fw-data-set-play.png)
8383

products/analytics/src/content/graphql-api/getting-started/execute-graphql-query.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ title: Use curl to query the GraphQL API
33
order: 60
44
---
55

6-
# Use curl to query the GraphQL API
6+
# Use curl to query the Analytics API
77

8-
You can submit a query you built up in the GraphiQL client as a payload in the `data` field of a POST request to the GraphQL API.
8+
You can submit a query built with the GraphiQL client as the payload in the `data` field of a POST request to the Analytics API.
99

10-
The advantage of executing the request with [curl](https://curl.se/) is that you can redirect the response to a file, and execute other post processing methods.
10+
The advantage of executing the request with [curl](https://curl.se/) is that you can redirect the response to a file and execute other post processing methods.
1111

1212
The GraphQL endpoint requires valid JSON, so you must pass the query as the _value_ part of a JSON _key:value_ pair with a key named "query".
1313

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
---
2-
title: Explore the GraphQL schema
2+
title: Explore the Analytics schema with GraphiQL
33
order: 40
44
---
55

6-
# Explore the GraphQL schema
6+
# Explore the Analytics schema with GraphiQL
77

8-
One of the great features of a GraphQL API is that it offers "introspection"—you can explore the graph (by making API calls) to see the available data sets, the fields and their types, and the operations you can perform.
8+
A useful feature a GraphQL API is that it offers [introspection](https://graphql.org/learn/introspection/), which allows you to explore the graph (by making API calls) to see the available data sets, the fields and their types, and the operations you can perform.
99

10-
[GraphiQL]([GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme)) uses introspection to provide the **Documentation Explorer** so that you can visually browse the Analytics schema, including available data sets (nodes) and available fields.
10+
[GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme) is a GraphQL client that uses introspection to provide the **Documentation Explorer** so that you can visually browse a GraphQL schema.
1111

12-
This article provides an introduction to the GraphQL Documentation Explorer.
12+
This article provides an introduction to exploring the Analytics GraphQL schema with the GraphiQL Documentation Explorer.
1313

1414
## Prerequisites
1515

16-
Before you begin, [configure the API endpoint and HTTP headers](/graphql-api/getting-started/authentication/graphql-client-headers) in the GraphQL client.
16+
Before you begin, [configure the API endpoint and HTTP headers](/graphql-api/getting-started/authentication/graphql-client-headers) in the GraphiQL client.
1717

1818
## Open the Documentation Explorer
1919

2020
To open the GraphiQL Documentation Explorer, click the **Docs** link in header of the response pane:
2121

2222
![GraphiQL Docs link](../../static/images/graphiql-docs-link.png)
2323

24-
A list of available objects displays. The objects in the list follow this syntax:
24+
The **Documentation Explorer** opens and displays a list of available objects:
25+
26+
![GraphiQl Doc Explorer](../../static/images/graphiql-doc-explorer.png)
27+
28+
Objects in the **Documentation Explorer** use this syntax:
2529

2630
```
2731
object-name: object-type-definition
@@ -31,42 +35,64 @@ object-name: object-type-definition
3135

3236
When you first open the **Documentation Explorer** pane, the `mutation` and `query` root types display:
3337

34-
![Mutation and query nodes](../../static/images/docs-query.png)
38+
![Mutation and query nodes](../../static/images/graphiql-doc-explorer-query-mutations.png)
3539

3640
In this example `query` is the name of a root, and `Query` is the type definition.
3741

38-
## Find the fields available for a given type definition
42+
## Find the fields available for a type definition
3943

40-
Click on the **type definition** of a node to view the fields that it provides. The **Documentation Explorer** pane also displays descriptions of the nodes.
44+
Click on the **type definition** of a node to view the fields that it provides. The **Documentation Explorer** also displays descriptions of the nodes.
4145

42-
For example, click the **Query** type definition. The **Documentation Explorer** panel displays the fields that Query` provides. In this example, the fields are `cost` and `viewer`.
46+
For example, click the **Query** type definition. The **Documentation Explorer** displays the fields that `Query` provides. In this example, the fields are `cost` and `viewer`:
4347

44-
![Cost and viewer fields](../../static/images/docs-viewer.png)
48+
![Cost and viewer fields](../../static/images/graphiql-doc-explorer-view-cost.png)
49+
50+
To explore the schema, click the names of objects and definitions. You can also use search input (magnifying glass) and breadcrumb links in the header.
4551

4652
## Find the arguments associated with a field
4753

48-
Click the type definition of the `viewer` field to list its sub-fields. The `viewer` field provides sub-fields that allow you to query `accounts` or `zones` data:
54+
Click the type definition of the `viewer` field (gold text) to list its sub-fields. The `viewer` field provides sub-fields that allow you to query `accounts` or `zones` data:
4955

50-
![viewer fields](../../static/images/docs-zone-filter.png)
56+
![viewer fields](../../static/images/graphiql-doc-explorer-viewer-fields.png)
5157

5258
The `accounts` and `zones` fields take arguments to specify which data set to query.
5359

54-
For example, the `zones` can take a filter of `ZoneFilter_InputObject` type as an argument. To view the fields available to filter, click **ZoneFilter_InputObject**.
60+
For example, `zones` can take a filter of `ZoneFilter_InputObject` type as an argument. To view the fields available to filter, click **ZoneFilter_InputObject**.
61+
62+
To limit the number of search results that the query returns, click **limit**.
63+
64+
## Find the data sets available for a zone
65+
66+
To view a list of the data sets available to query, click the **zone** type definition (gold text):
67+
68+
![Zones type definition](../../static/images/graphiql-doc-explorer-zones.png)
5569

56-
To limit the amount of search results that the query returns, click the **limit** argument.
70+
A list of data sets displays in the **Fields** section, each with list of valid arguments and a brief description. Arguments that end with an exclamation mark (`!`) are required.
5771

58-
## Find the search nodes available for a zone
72+
![Search nodes](../../static/images/graphiql-doc-explorer-zone-fields.png)
5973

60-
To view a list of the data sets available for a zone, click on the `zones` type definition after the colon (`:`) in the `zones` field:
74+
Use the search input (magnifying glass icon) to find specific data sets:
6175

62-
![Zones type definition](../../static/images/docs-zone.png)
76+
![Find field in Doc Explorer](../../static/images/graphiql-doc-explorer-find-firewall.png)
6377

64-
A list of **search nodes** displays, with a brief description of their behavior and a list of valid arguments. Arguments that end with an exclamation mark (`!`) are required.
78+
To select a data set, click its name.
6579

66-
![Search nodes](../../static/images/docs-fw-data-set.png)
80+
The definition for the data set displays. This example shows the `firewallEventsAdaptive` data set:
81+
82+
![firewallEventsAdaptive data set definition](../../static/images/graphiql-doc-explorer-firewallevents-definition.png)
6783

6884
Refer to [_Data Sets (tables)_](/graphql-api/features/data-sets) for details on the nomenclature and behavior of these nodes.
6985

70-
To view the fields available for a particular data set, click on its type definition. If you click on the **ZoneFirewallEventsAdaptive** type definition in the **firewallEventsAdaptive** node, a list of fields is displayed:
86+
## Find the fields available for a data set
87+
88+
To view the fields available for a particular data set, click on its type definition (gold text).
89+
90+
For example, click the **ZoneFirewallEventsAdaptive** type definition to view the fields available for the `firewallEventsAdaptive` data set:
91+
92+
![firewallEventsAdaptive definition](../../static/images/graphiql-doc-explorer-firewall-type-definition.png)
93+
94+
The list of fields displays:
95+
96+
![ZoneFirewallEventsAdaptive type definition](../../static/images/graphiql-doc-explorer-firewall-fields.png)
7197

72-
![ZoneFirewallEventsAdaptive type definition](../../static/images/docs-fw-fields-list.png)
98+
For more on working with the Analytics API in GraphiQL, see [Create a query in GraphiQL](/graphql-api/getting-started/compose-graphql-query).
80 KB
Loading
55 KB
Loading
15.2 KB
Loading
30.5 KB
Loading
30.3 KB
Loading
19.9 KB
Loading

0 commit comments

Comments
 (0)