Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schema/all_documents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2495,7 +2495,7 @@
"slug": "schema-queries-with-woql",
"body": {
"@type": "Body",
"value": "> To use this HowTo, first [clone the Star Wars demo](/docs/clone-a-demo-terminuscms-project/) into your team on TerminusCMS. You will then have access to the data needed for this tutorial.\n\n## Finding elements from the schema.\n\nIn order to query the schema, you can use _graph_ arguments to WOQL. TerminusCMS stores each branch as a pair of graphs, an instance graph and a schema graph.\n\nWe can specify the graph by passing it as an argument to the `quad` word.\n\nTo find all classes in the schema we can write:\n\n```javascript\nlet v = Vars(\"cls\");\nquad(v.cls, \"rdf:type\", \"sys:Class\", \"schema\")\n```\n\nThis results in:\n\ncls\n\n@schema:Film\n\n@schema:People\n\n@schema:Planet\n\n@schema:Species\n\n@schema:Starship\n\n@schema:Vehicle\n\nThe `@schema` denotes the default schema prefix, and makes it clear that this identifier lives in the schema name space rather than the data name space.\n\nWe can also use the typical `triple` word if we use `from` to set our default graph to `schema` instead of `instance`.\n\n```javascript\nlet v = Vars(\"cls\");\nfrom(\"schema\")\n .triple(v.cls, \"rdf:type\", \"sys:Class\")\n```"
"value": "> To use this HowTo, first [clone the Star Wars demo](/docs/clone-a-demo-terminuscms-project/) into your team on TerminusCMS. You will then have access to the data needed for this tutorial.\n\n## Finding elements from the schema.\n\nIn order to query the schema, you can use _graph_ arguments to WOQL. TerminusCMS stores each branch as a pair of graphs, an instance graph and a schema graph.\n\nWe can specify the graph by passing it as an argument to the `quad` word.\n\nTo find all classes in the schema we can write:\n\n```javascript\nlet v = Vars(\"cls\");\nquad(v.cls, \"rdf:type\", \"sys:Class\", \"schema\")\n```\n\nThis results in:\n\ncls\n\n@schema:Film\n\n@schema:People\n\n@schema:Planet\n\n@schema:Species\n\n@schema:Starship\n\n@schema:Vehicle\n\nThe `@schema` denotes the default schema prefix, and makes it clear that this identifier lives in the schema name space rather than the data name space.\n"
},
"seo_metadata": {
"@type": "SEOMetadata",
Expand Down