cayleygraph/cayley · error
Unexpected number of documents
Error message
Unexpected number of documents
What it means
Error "Unexpected number of documents" thrown in cayleygraph/cayley.
Source
Thrown at query/linkedql/jsonld_util.go:33
return nil, err
}
c, err := proc.Compact(d, context, opts)
if err != nil {
return nil, err
}
return c, nil
}
// singleDocumentFromRDF transforms a RDF dataset to a single map JSON-LD document.
func singleDocumentFromRDF(dataset *ld.RDFDataset) (interface{}, error) {
api := ld.NewJsonLdApi()
opts := ld.NewJsonLdOptions("")
documents, err := api.FromRDF(dataset, opts)
if err != nil {
return nil, err
}
if len(documents) != 1 {
return nil, fmt.Errorf("Unexpected number of documents")
}
return documents[0], nil
}
View on GitHub (pinned to 81dcd7d73e)
When it happens
Trigger: Thrown at query/linkedql/jsonld_util.go:33 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cayleygraph/cayley@81dcd7d73e (2026-09-06).
Data as JSON: /api/errors/eadf8f866c7e1497.
Report an issue: GitHub.