diff --git a/rdflib/plugins/stores/sparqlconnector.py b/rdflib/plugins/stores/sparqlconnector.py index e2bb83909..87277a2e6 100644 --- a/rdflib/plugins/stores/sparqlconnector.py +++ b/rdflib/plugins/stores/sparqlconnector.py @@ -91,6 +91,7 @@ def query( raise SPARQLConnectorException("Query endpoint not set!") params = {} + default_graph = default_graph or self.kwargs.get("default_graph") # this test ensures we don't have a useless (BNode) default graph URI, which calls to Graph().query() will add if default_graph is not None and type(default_graph) is not BNode: params["default-graph-uri"] = default_graph @@ -162,7 +163,7 @@ def update( raise SPARQLConnectorException("Query endpoint not set!") params = {} - + default_graph = default_graph or self.kwargs.get("default_graph") if default_graph is not None: params["using-graph-uri"] = default_graph