Closed pheyvaer closed 3 years ago
The following code stops before the query returns the results.
const {Client} = require("graphql-ld"); const {QueryEngineComunica} = require( "graphql-ld-comunica"); main(); async function main() { // Define a JSON-LD context const context = { "@context": { "KNOWS": "https://data.knows.idlab.ugent.be/person/office/#", "schema": "http://schema.org/", "type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "name": "schema:name", "description": "schema:description", "Tutorial": "schema:HowTo", "hasTutorial": {"@reverse": "schema:contributor"}, "url": "schema:url" } }; // Create a GraphQL-LD client based on a client-side Comunica engine over 2 sources const comunicaConfig = { sources: [ "https://pieterheyvaert.com/", "https://data.knows.idlab.ugent.be/person/office/tutorials.ttl", "https://data.knows.idlab.ugent.be/person/office/#" ], }; const client = new Client({ context, queryEngine: new QueryEngineComunica(comunicaConfig) }); // Define a query const query = ` { id(_:KNOWS) hasTutorial { type (_:Tutorial) description @single @optional name @single url @single } } `; const { data } = await client.query({ query }); };
When using comunica-sparql with the following details it works.
comunica-sparql
| software | version | ------------------- | ------- | Comunica Init Actor | 1.16.2 | node | v14.9.0 | npm | 6.14.8 | yarn | 1.21.1 | Operating System | linux (Linux 4.15.0-117-generic)
I used the following command.
comunica-sparql https://pieterheyvaert.com/ https://data.knows.idlab.ugent.be/person/office/tutorials.ttl https://data.knows.idlab.ugent.be/person/office/# -f my-query.query -c config.json -i graphql
Thanks for reporting.
For reference, possibly caused by https://github.com/comunica/comunica/issues/724.
Should be fixed thanks to comunica/comunica#724
The following code stops before the query returns the results.
When using
comunica-sparql
with the following details it works.I used the following command.