From ac3ea688fb5425a927029cddc54b80c4ac15e4aa Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 5 Aug 2020 07:27:51 +0200 Subject: [PATCH] gotcha(gql): if you just import the type the config library doesnt work :shrug: --- packages/backend/src/index.ts | 1 - packages/backend/src/plugins/graphql.ts | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 50f59795fc..1d5211597d 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -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')); diff --git a/packages/backend/src/plugins/graphql.ts b/packages/backend/src/plugins/graphql.ts index 0f9b167d19..d52e28f9cb 100644 --- a/packages/backend/src/plugins/graphql.ts +++ b/packages/backend/src/plugins/graphql.ts @@ -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, }); }