The Data Graph Playground UI consists of these main areas and features:
- Query editor: Build your own Data Graph queries and submit them.
- Documentation Explorer: Interactive documentation for the queries, dataset schemas, and dataset attributes.
- Results: View the results of your queries.
- History: Save your queries so you can run them again later or copy them.
When you first open the Playground, the Query editor will be visible. Depending on the size of the Query editor pane, the Results pane may or may not be visible.
Query editor
The Query editor allows you to create a query and submit it to the Data Graph API.
The editor can have more than one query open at the same time. If more than one query is open, the query names will display as tabs across the top of the editor. To access a different query, select its tab. You may need to scroll across the top of the editor to access queries that are open but not visible.
At the bottom of the editor are two tabs:
- Variables: Allows you to edit a query's variables.
- Headers: Allows you to edit a query's header. Before you submit a query, you must enter a token here, then click the Refresh icon.
To create a new query, click the Add tab icon that appears to the right of the query tabs. You may have to scroll all the way to the right to see the icon. Once you click the icon, a new query tab will appear. It will be loaded with sample query text.
To edit a query, put your cursor in the query text and edit it. For a list of the datasets, data fields, and queries you can access, open the Documentation Explorer.
The Query editor also has these features to make editing queries easier:
- Intellisense autocompletion: If you start typing the name of a field or query, a list of available options will appear that you can select from to complete the query.
- Prettify query: Indents your query appropriately and removes empty lines. This icon is on the right side of the Query editor.
- Merge fragments into query: Allows you to manipulate GraphiQL fragments. This icon is on the right side of the Query editor.
- Copy query: Copies your query to the clipboard. This icon is on the right side of the Query editor.
For more information about the features available in the Query editor, see GraphQL.NET at https://graphql-dotnet.github.io/.
Documentation Explorer
The Documentation Explorer simplifies the task of creating queries by providing in-context assistance. It allows you to drill down documentation for query methods and datasets to find exactly what you're looking for, without wading through pages of text.
When you open the Playground, the Documentation Explorer may not be visible. To open it, click the Documentation Explorer icon to the left of the Query Builder.
Docs is the top level of the documentation. From it you can access documentation on Data Graph's queries and datasets. By clicking on a dataset or query method, you can see its attributes and traverse complex data relationships.
Results
After you submit a query, the JSON results of the query are displayed to the right of the Query editor, in the gray margin.
If the Query editor is too wide, the results may not be visible. To reveal the results, make the gray margin larger by grabbing the right edge of the editor pane and moving it to the left.
History
To see your recent queries, click History to the left of the editor. The History list will be displayed.
Each time you submit a new query, it will be added to the History.
Once a query is saved in the History:
- To open a query in the editor, click its label.
- To edit a query's label, click Edit label.
- To favorite a query, click Add favorite.
- To remove a query from the History, click Delete from history.
To clear the History, click Clear.