Error creating and viewing graph in Sparql

117 views Asked by At

I am using CREATE GRAPH to create a new graph in sparql. Which gives me success update succeeded. But when i query for all the graphs i cant find it. I am using SELECT and Union to query. I am using Fuseki server.

1

There are 1 answers

2
Jeen Broekstra On

If you have created the graph but have not yet added any data to it, the query pattern GRAPH ?g {?s ?p ?o} won't match the graph, because ?s ?p ?o can not be bound to anything.

The triplestore you are accessing via Fuseki server presumably does not really support the notion of an 'empty graph' (most triplestores don't, although technically it's allowed by the SPARQL standard). The CREATE operation returns true but effectively does nothing. Only when you start actually adding data to the graph is it really created.