I have loaded the folloing JSON-LD from "Libary" tab of https://json-ld.org/playground/ into Stardog:
{
"@context": {
"dc11": "http://purl.org/dc/elements/1.1/",
"ex": "http://example.org/vocab#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"ex:contains": {
"@type": "@id"
}
},
"@graph": [
{
"@id": "http://example.org/library",
"@type": "ex:Library",
"ex:contains": "http://example.org/library/the-republic"
},
{
"@id": "http://example.org/library/the-republic",
"@type": "ex:Book",
"dc11:creator": "Plato",
"dc11:title": "The Republic",
"ex:contains": "http://example.org/library/the-republic#introduction"
},
{
"@id": "http://example.org/library/the-republic#introduction",
"@type": "ex:Chapter",
"dc11:description": "An introductory chapter on The Republic.",
"dc11:title": "The Introduction"
}
]
}
- But how do I GraphQL query it?
The following errors out:
query withPrefixes @prefix(ex: "http://example.org/vocab#") {
ex_Book {
dc11_title
}
}
I've also added ex namespace prefix to Stardog database and tried with no @prefix directive but getting this error:
QE0PE2: Encountered " <FUNCTION_NAME> "query "" at line 1, column 1.
Was expecting one of:
<EOF>
";" ...
<HINT> ...