I did changes on this functionality to use Ngrx Stores to keep the sparql query on sparql client.
I did the implementation of state approach following this rules:
Create a folder named store in the main component.
Create actions and reducer folder with his files main-component.action or main-component.reducer.
If is necessary create a folder with the model of the object to store.
Create a ts file on the main component root folder, main-component.state to define the properties that this state could store. (maybe this point is the most important because we need define if we would follow this approach or define an unique state file).
Define on main-component.module imports StoreModule.forRoot({identifier: reducer import...}).
I did changes on this functionality to use Ngrx Stores to keep the sparql query on sparql client.
I did the implementation of state approach following this rules: