I'm new to NgRx. After preliminary research NgRx and particularly the NgRx Data package appear to be a good fit for an application I am working on. One caveat is our entities are backed by micro-services with unconventional routes.
Each entity has its own micro-service, and any operation is further isolated with a base record ID within the URL params.
[microServiceRoute]/[baseRecordId]/entityEndpoint
I have a lookup table for the routes, but the baseRecordId
would be held in the store. The NgRx Data docs has a simple example outlining the replacement of the URLGenerator.
How can I specify my microService routes on a per Entity basis, while also having this generator read from the store? Can this be done easily or should I approach this from a custom service per entity perspective?
https://ngrx.io/guide/data/extension-points#replace-the-httpurlgenerator