Querying your discourse graph
Note: a lot of the querying functionality overlaps with the RoamJS query-builder extension, which was spun off from this extension. You might find the documentation for the query-builder helpful for learning how to run queries: https://roamjs.com/extensions/query-builder
The query drawer component allows you to construct structured queries over your discourse graph, based on discourse relations (e.g., "find all evidence that supports/opposes a claim"), and reason over the results in a structured, tabular format (e.g., "find all evidence that supports a claim, and allow me to filter/sort by methodological details").
Demo of query drawer (*slightly* different version from latest version, so some details of the results table are different)
Use Command Palette (⌘+
Potherwise) to access the query drawer.
A query drawer component will open from the left. From there, you can construct structured queries of your discourse graph and explore their results in a tabular format.
Example: find all evidence that informs a question, but only if it was collected in a specific location (this example assumes at least some evidence pages have an attribute
Example: find all evidence that informs a question, and select a methods attribute to display so we can sort/filter on it (this example assumes at least some evidence pages have an attribute
Results (note: will display "blank" for nodes that lack values for the selected attribute):
If you have defined Discourse attributes for the node you want to query, you can select it as a column in your query. The syntax for accessing a node's discourse attribute as a select is
Example: find all claims and display their "Evidence" discourse attributes (number of supporting evidence relations) as a column.
You can filter and sort each column in the results table.
You can name a query if you like!
You can save a query to its own page if you want to keep it around for easier access.
It will be saved to the namespace
Last modified 7mo ago