Skip to content

Commit ad963d9

Browse files
committed
PCX-1086 Edit Explore schema topic
1 parent 2aafbbd commit ad963d9

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

products/analytics/src/content/graphql-api/getting-started/explore-graphql-schema.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,66 @@ order: 40
77

88
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.
99

10-
_GraphiQL_ uses this functionality to provide a "Documentation Explorer" that you can use to understand the schema. Click on the **Docs** link on the right-hand side and then drill down, starting with `query` and proceeding to `viewer` and then `zone`. GraphiQL also uses introspection to provide query auto-complete and syntax validation.
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.
1111

12-
You can explore the schema of the Coudflare GraphQL endpoint in a GraphQL client. The examples below use the GraphiQL client.
12+
This article provides an introduction to the GraphQL Documentation Explorer.
1313

14-
Before you begin, configure the API endpoint and HTTP headers in the GraphQL client.
14+
## Prerequisites
1515

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

18-
Click **Docs** to open the **Documentation Explorer** pane.
18+
## Open the Documentation Explorer
1919

20-
A list of available nodes displays. The nodes in the list follow this syntax:
20+
To open the GraphiQL Documentation Explorer, click the **Docs** link in header of the response pane:
21+
22+
![GraphiQL Docs link](../../static/images/graphiql-docs-link.png)
23+
24+
A list of available objects displays. The objects in the list follow this syntax:
2125

2226
```
23-
node-name: node-type-definition
27+
object-name: object-type-definition
2428
```
2529

26-
## Find the type definition of a node
30+
## Find the type definition of an object
2731

28-
When you first open the **Documentation Explorer** pane, the **mutation** and `query` nodes display:
32+
When you first open the **Documentation Explorer** pane, the `mutation` and `query` root types display:
2933

3034
![Mutation and query nodes](../../static/images/docs-query.png)
3135

32-
In this example `query` is the name of the node, and `Query` is the type definition of the node.
36+
In this example `query` is the name of a root, and `Query` is the type definition.
3337

3438
## Find the fields available for a given type definition
3539

3640
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.
3741

38-
Click the `Query` type definition. The **Documentation Explorer** panel displays the fields that the `query` node provides. In this example, the fields are `cost` and `viewer`.
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`.
3943

4044
![Cost and viewer fields](../../static/images/docs-viewer.png)
4145

4246
## Find the arguments associated with a field
4347

44-
Click on 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:
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:
4549

4650
![viewer fields](../../static/images/docs-zone-filter.png)
4751

4852
The `accounts` and `zones` fields take arguments to specify which data set to query.
4953

50-
For the `zones` node you can provide a filter of `ZoneFilter_InputObject` type. To view the fields available to filter, click **ZoneFilter_InputObject**.
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**.
5155

5256
To limit the amount of search results that the query returns, click the **limit** argument.
5357

5458
## Find the search nodes available for a zone
5559

56-
To view a list of the search nodes available for a zone, click on the `zones` type definition after the colon (`:`) in the `zones` field:
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:
5761

5862
![Zones type definition](../../static/images/docs-zone.png)
5963

60-
A list of **search nodes** appears, with a brief description of their behavior and a list of valid arguments. Arguments that end with an exclamation mark (`!`) are required.
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.
6165

6266
![Search nodes](../../static/images/docs-fw-data-set.png)
6367

64-
Refer to [Data Sets (tables)](/graphql-api/features/data-sets) for details on nomenclature and behavior of these nodes.
68+
Refer to [_Data Sets (tables)_](/graphql-api/features/data-sets) for details on nomenclature and behavior of these nodes.
6569

66-
To view the fields that a node provides, click on its type definition. If you click on the **ZoneFirewallEventsAdaptive** type definition in the **firewallEventsAdaptive** node, a list of fields is displayed:
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:
6771

6872
![ZoneFirewallEventsAdaptive type definition](../../static/images/docs-fw-fields-list.png)
87.8 KB
Loading

0 commit comments

Comments
 (0)