Description
This was a topic of a lot of discussion with the Angular team. The basic premise is that building an app to consume and display known and established data models (a recipe site) is all well and good, but the ideal scenario is a (service / library / application / whatever) that can respond to changing data models and whole new data models dynamically.
On the Drupal side, this means that for each data model we would want a schema exposed, which should already be being generated by the OpenAPI integration, we'd just need those to be directly addressable / linked to from the /api endpoint perhaps.
On the front end side, there were two possible approaches to this that we discussed, which can be broken into the runtime approach vs the build time approach.
Runtime approach: A (very) rough sketch of this already exists, we hacked it together yesterday here: StephenFluin@e2af530
This approach ~ works, but has drawbacks in terms of potential scaling issues, inability to customize templates per data model, etc.
Build time or CLI approach: This idea would be to query for our schemas as a CLI command or build step, and then build out d.ts, component, and template files based on the currently active schemas. This would obviously force a new build each time a field/bundle was added to the site, but would also grant far more customization ability to the user, type checking of templates, etc. Most likely this is the better long term approach but we might want to diagram out a design doc to make sure the idea is fully fleshed out before attempting an implementation.