gotcha(gql): if you just import the type the config library doesnt work 🤷

This commit is contained in:
blam
2020-08-05 07:27:51 +02:00
committed by Fredrik Adelöw
parent e4986c4eef
commit ac3ea688fb
2 changed files with 6 additions and 3 deletions
-1
View File
@@ -60,7 +60,6 @@ async function main() {
const configs = await loadBackendConfig();
const configReader = ConfigReader.fromConfigs(configs);
const createEnv = makeCreateEnv(configs);
const healthcheckEnv = useHotMemoize(module, () => createEnv('healthcheck'));
const catalogEnv = useHotMemoize(module, () => createEnv('catalog'));
const scaffolderEnv = useHotMemoize(module, () => createEnv('scaffolder'));
+6 -2
View File
@@ -30,10 +30,14 @@
*/
import { createRouter } from '@backstage/plugin-graphql-backend';
import type { PluginEnvironment } from '../types';
import { PluginEnvironment } from '../types';
export default async function createPlugin({ logger }: PluginEnvironment) {
export default async function createPlugin({
logger,
config,
}: PluginEnvironment) {
return await createRouter({
logger,
config,
});
}