Closed ccolonna closed 3 years ago
Hi @Christian-Nja sorry for my late replies!
getDynamicEndpointParameters
is the right function to use. And indeed it is a async function for which you would need to use a callback function like:
getDynamicEndpointParameters(user, datasetURI, (endpointParameters)=> {
graphName = endpointParameters.graphName;
//your code
});
If you like to run this in a synchronous way, you need to write some wrappers based on async
and await
. Then you would be able to run something like:
const sparqlEndpointConfig = await getDynamicEndpointParameters(datasetURI);
see https://javascript.info/async-await for some tutorials...
Thank you very much @ali1k i managed to do this!
Hello!
suppose i navigate a dataset, is there a way to get a reference to the sparql endpoint where the dataset is hosted, in case i'm connected via dynamic configuration?
I found a
getDynamicEndpointParameters
in./utils/helpers
but i cannot figured it out how to use it as the function accepts a callback and doesn't return anything.what i need would be something like:
const sparqlEndpointConfig = getSparqlEndpoint(datasetURI)
I wonder if you could suggest some ideas :)
Thank you very much for your help!