There exist multiple ways to do this:
Option 1: Use the SPARQL endpoint spec
Option 1.1
A query is sent to the endpoint, if the query is already maintained (read query containment) the results are returned. Otherwise, the new query is returned.
Option 1.2
The endpoint is started with some "hardcoded" queries. A query is sent to the endpoint, if the query is already maintained (read query containment) the results are returned. Otherwise, an error is returned.
Option 2: Make a new incremental SPARQL endpoint spec
A query is sent to the endpoint, a webhook or websocket is opened to get updates from the query. When the webhook or websocket is closed, the query (binding stream) is destroyed.
There exist multiple ways to do this:
Option 1: Use the SPARQL endpoint spec
Option 1.1
A query is sent to the endpoint, if the query is already maintained (read query containment) the results are returned. Otherwise, the new query is returned.
Option 1.2
The endpoint is started with some "hardcoded" queries. A query is sent to the endpoint, if the query is already maintained (read query containment) the results are returned. Otherwise, an error is returned.
Option 2: Make a new incremental SPARQL endpoint spec
A query is sent to the endpoint, a webhook or websocket is opened to get updates from the query. When the webhook or websocket is closed, the query (binding stream) is destroyed.