Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/graphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ Graphs.prototype.sparql = function queryGraphSPARQL() {

// TODO: collection, directory?

// Single configuration object
if (argLen === 1) {
var params = args[0];
acceptType = params.contentType;
Expand All @@ -626,9 +627,11 @@ Graphs.prototype.sparql = function queryGraphSPARQL() {
if ((acceptType == null) || (query == null)) {
throw new Error('named parameters must specify content type and query for SPARQL query on graphs');
}
} else {
}
// Multiple params
else {
acceptType = args[0];
if (argLen > 3) {
if (argLen >= 3) {
defaultGraphs = Array.prototype.slice.call(arguments, 1, argLen - 1);
}
query = args[argLen - 1];
Expand Down