Skip to content

Upgrading to RDF.ex 0.10

Marcel Otto edited this page Dec 13, 2021 · 3 revisions

The only breaking change in this version is that the RDF.Turtle.Encoder no longer supports the encoding of RDF.Datasets. You'll have to aggregate an RDF.Dataset to an RDF.Graph on your own now. So, where you previously could do

RDF.Turtle.to_string(dataset)

you'll now have to do something like this

dataset
|> RDF.Dataset.graphs()
|> Enum.reduce(RDF.graph(), &RDF.Graph.add(&2, &1))
|> RDF.Turtle.to_string()

This also affects the SPARQL.Client when used with RDF.ex 0.10. You can no longer pass RDF.Datasets to the update functions, but have to convert them to RDF.Graphs before.

Clone this wiki locally