Run a WOQL Query
Assuming you have connected with the JavaScript Client, have a database, added a schema and some data, you now would like to query the database.
The example code below shows a simple query that returns all of the database's triples
const runQuery = async () => {
const WOQL = Terminusdb.WOQL
const v = WOQL.Vars("subject","predicate","object")
const query = Terminusdb.WOQL.triple(v.subject,v.predicate,v.object)
const result = await client.query(query)
console.log("my query result", JSON.stringyfy(result,null,4))
}
For more information and examples about querying with WOQL please see the [/woql-basics)