rdf-connect / ldes-client

The TREE/LDES client to replicate and synchronize LDESs: the RDF Connect processor
https://rdf-connect.github.io/ldes-client/
6 stars 2 forks source link

Reading a stream never produces a member #27

Closed kkostov closed 2 months ago

kkostov commented 2 months ago

If we initialize the client for https://telraam-api.net/ldes/observations/by-page, the promise to make the first stream never resolves. No error is thrown.

const client = replicateLDES(
    intoConfig({
     "https://telraam-api.net/ldes/observations/by-page",
      onlyDefaultGraph: true,
    }),
    undefined,
    undefined,
    "none",
  );

const reader = client.stream({ highWaterMark: 10 }).getReader();
let el = await reader.read(); // <- never resolves
kkostov commented 2 months ago

@ajuvercr pointed me in the right direction. Since the last version, the parameters to pass to the client have changed and the correct usage is

const client = replicateLDES(
    intoConfig({
     "https://telraam-api.net/ldes/observations/by-page",
      onlyDefaultGraph: true,
    })
  );

So it works 🎊 !