I work in a project with ngrx, also using other libraries & packages from ngrx like ngrx/entity or ngrx/data.
Sometimes I need to create effects in certains actions belonging (in terms of being dispatched) to ngrx/data.
Where I find some difficulties is dispatching other actions with strong dependencies of some other actions dispatched by ngrx/data in an automatic way or even by myself (custom) like below
...
@Injectable()
export class FooEffects {
fooSelected$ = createEffect(() =>
this.actions$
.pipe(
ofType(FooActions.fooSelected),
map((action) => this.entityActionFactory.create<Foo>('Foo', EntityOp.QUERY_LOAD),
))
);
...
constructor(private actions$: Actions, private entityActionFactory: EntityActionFactory) { }
}
...
So, how do I listen Actions in ngrx/data like QUERY_LOAD, the common get/all or any other else to achieve the creation of new effects? Does it exist something like
fooNgrxDataEffectForQueryLoad$ = createEffect(() =>
this.actions$
.pipe(
ofType(('Foo', EntityOp.QUERY_LOAD)),
Or asked in another way, how do I write effects for "NATIVE" actions in ngrx/data?
I know ngrx/data was created to get rid off from of Actions, Selectors, Effects, Reducers as much as it is possible, having therefore less boilerplate. However, there should be a way to create effects from ngrx/data.
Many thanks in advance.