[discuss] Introduce render data provider API #54925
Labels
discuss
Feature:New Platform
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
In the legacy platform, we have the concept of "injected vars" which allow plugins to provide functions on the server that return values to be exposed to client-side code.
Some problems with the legacy implementation of this:
In the Kibana Platform, we introduced the exposeToBrowser config option to expose config values to the frontend. This covers most cases that injected vars was being used for, however there are some use cases that cannot be solved by this:
Drawbacks with requiring these plugins to get this data via a fetch to a dedicated endpoint:
Possible Solution
We could add an API to the RenderingService that allows plugins to register functions that provide data to the frontend, similar to the legacy platform, with some distinct differences:
bootstrap.js
script so that this data can be loaded in parallel with JS and CSS. This endpoint would be provided by the RenderingService and would include return the data returned by all registered data providers.Discussion
The text was updated successfully, but these errors were encountered: