You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's seems like query variables are not supported yet.
Example:
constClient=require('graphql-ld').Client;constQueryEngineComunica=require('graphql-ld-comunica').QueryEngineComunica;// Define a JSON-LD contextconstcontext={"@context": {"Film": "http://dbpedia.org/ontology/Film","label": {"@id": "http://www.w3.org/2000/01/rdf-schema#label","@language": "en"},"starring": "http://dbpedia.org/ontology/starring"}};// Create a GraphQL-LD client based on a client-side Comunica engine over 3 sourcesconstcomunicaConfig={sources: [{type: "sparql",value: "http://dbpedia.org/sparql"},],};constclient=newClient({context,queryEngine: newQueryEngineComunica(comunicaConfig)});// Define a queryconstquery=`query MoviesActor($actor: String!){ id @single ... on Film { starring(label: $actor) @single } }`;constvariables={actor: "Angelina_Jolie"};// Execute the queryasyncfunctionex(){constdata=awaitclient.query({query: query,variables: variables});console.log(data);}ex();
Returns the following error: Error: Undefined variable: actor
The text was updated successfully, but these errors were encountered:
It's seems like query variables are not supported yet.
Example:
Returns the following error:
Error: Undefined variable: actor
The text was updated successfully, but these errors were encountered: