The following example demonstrates usage of the named-graph-exclude
pragma.
DEFINE input:grab-follow-predicate <foaf:knows> DEFINE input:grab-var "their_id" DEFINE input:named-graph-exclude <http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com> DEFINE input:grab-depth 2 DEFINE input:grab-limit 10 PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?my_id ?firstname ?Knows ?their_id WHERE { GRAPH ?g { ?my_id a foaf:Person ; foaf:firstName ?firstname ; foaf:knows ?their_id . ?their_id foaf:nick ?Knows . } } LIMIT 10