TREEcg / event-stream-client

Deprecated! Use the rdf-connect/ldes-client instead
https://github.com/rdf-connect/ldes-client
Other
14 stars 9 forks source link

Add @embed when framing #64

Open brechtvdv opened 1 year ago

brechtvdv commented 1 year ago

The JSON-LD framing algorithm only embeds triples of a subject the first time it is encountered. Add @embed: true when framing so subjects are always shown in full.:

  const framed = await jsonld.frame(obj, frame);

Change to:

    const framed = await jsonld.frame(doc, frame, {embed:'@always'});