I want to check if the graph exists in my Fuseki server and if it does, it should return a message like
The graph exists
You can do this with an ASK query. For example, to check that a named graph http://example.org/graph1 exists, you can do this:
http://example.org/graph1
ASK WHERE { GRAPH <http://example.org/graph1> { ?s ?p ?o } }
It will return true if it exists, false otherwise.
true
false
You can do this with an ASK query. For example, to check that a named graph
http://example.org/graph1
exists, you can do this:It will return
true
if it exists,false
otherwise.