Working towards building a handler to serve Toolpad data that can be used in a next.js api route for https://github.com/mui/mui-toolpad/issues/3012. Started on a series of refactorings:
Remove RuntimeConfig. When running as a react component, we can't rely on config passed through the build. The only thing that was still in there was externalUrl, which was only used for (deprecated) sheets oauth client. Which is editor configuration, not runtime configuration.
decouple the project object from the env/data/function managers through the invalidateQueries. Shift the responsibility for query invalidation to the project object.
Working towards building a handler to serve Toolpad data that can be used in a next.js api route for https://github.com/mui/mui-toolpad/issues/3012. Started on a series of refactorings:
RuntimeConfig
. When running as a react component, we can't rely on config passed through the build. The only thing that was still in there wasexternalUrl
, which was only used for (deprecated) sheets oauth client. Which is editor configuration, not runtime configuration.invalidateQueries
. Shift the responsibility for query invalidation to the project object.