Skip to content

Fix to graph jsonld array#23

Merged
namedgraph merged 2 commits into
mainfrom
fix-to-graph-jsonld-array
Jun 30, 2026
Merged

Fix to graph jsonld array#23
namedgraph merged 2 commits into
mainfrom
fix-to-graph-jsonld-array

Conversation

@namedgraph

Copy link
Copy Markdown
Member

No description provided.

namedgraph and others added 2 commits June 30, 2026 11:07
to_graph only accepted dict/Graph, but a JSON-LD document may be a
top-level array of nodes — which is exactly what SPARQL DESCRIBE/CONSTRUCT
over multiple subjects returns. client.query handed that list straight to
to_graph, so every DESCRIBE/CONSTRUCT pipeline broke with
"TypeError: Cannot convert list to Graph" (regression in 1.4.0, when
parsing was centralized into to_graph).

Accept list alongside dict — rdflib's JSON-LD parser handles top-level
arrays natively. Add a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@namedgraph namedgraph merged commit 767c425 into main Jun 30, 2026
6 checks passed
@namedgraph namedgraph deleted the fix-to-graph-jsonld-array branch June 30, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant