-
Couldn't load subscription status.
- Fork 32
Description
It would be good to have support to create APIs from SPARQL queries stored in nanopublications.
Perhaps the easiest way of doing this is by using the specUrl option, using the nanopub URI as query locators. If dereferencing the URI returns a plain grlc decorated SPARQL query, that should be enough to build the spec.
Other options could be to have people write their own template of how to use the nanopubs to compose the API, so to let them build their APIs by just publishing nanopublications. For this we’d need new grlc code but I think it’d be rather minimal—possibly in the fileLoader.
But ideally grlc could check several places in the nanopub network, where the nanopub is available at various locations, so the downtime of a single server would affect the retrieval of the content. The above nanopub is available at these places for example:
- https://np.petapico.org/RA681Yn8PUB64WhUzoHYf6lxFD5nyILvqyjapZ0PbhkrU
- https://np.knowledgepixels.com/RA681Yn8PUB64WhUzoHYf6lxFD5nyILvqyjapZ0PbhkrU
- https://server.np.trustyuri.net/RA681Yn8PUB64WhUzoHYf6lxFD5nyILvqyjapZ0PbhkrU
So ideally grlc could check several servers. This could be via a hard-coded list of servers, or later by querying the network itself for
an up-to-date list. Or as an URL argument, so the grlc request would include
"?nanopub-servers=https://np.petapico.org/+https://np.knowledgepixels.com/+https://server.np.trustyuri.net/".