HashiCorp Cloud Platform
Infragraph queries
Queries are the method for filtering data in the resource graph.
When you build a query, you have the option to select a pre-built query to search your data. Pre-built queries help you get started with the resource graph features. You can edit queries after you run them to return more specific results.
Query building blocks
Query building blocks are the edges, nodes, operators, and conditions that exist in the query interface.
There are over a thousand different conditions, edges, and operators that you can apply. The graph explorer includes a UI tool that helps you build queries by categorizing resources according to their function and their relationships to other resources.
Refer to the Infragraph query language reference for a full list of supported relationships between nodes.
If you cannot find an option you want to query on, you can use JSON to query the graph. For example JSON queries, refer to Infragraph example queries.
Run queries
Infragraph supports the following ways to run queries:
- Use the graph explorer to build queries with the UI.
- Use the graph explorer to run JSON queries.
For information on how to write JSON queries, refer to the Infragraph query language reference documentation.
Query catalog
After you build a query, you have the option to save it in the query catalog for repeat use.
To access the query catalog, click Query catalog in your HCP organization's left navigation panel.
To run a query, click its name. Alternatively, next to the query you want to run, click ... and the Run Query.