diff --git a/.changeset/short-planets-suffer.md b/.changeset/short-planets-suffer.md deleted file mode 100644 index 9626a05e54..0000000000 --- a/.changeset/short-planets-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-graphql-backend': patch ---- - -Added support to the graphql plugin for the new backend diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index e7b52f7ad0..a6431aab06 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -38,7 +38,6 @@ "@backstage/plugin-catalog-backend-module-unprocessed": "workspace:^", "@backstage/plugin-devtools-backend": "workspace:^", "@backstage/plugin-entity-feedback-backend": "workspace:^", - "@backstage/plugin-graphql-backend": "workspace:^", "@backstage/plugin-kubernetes-backend": "workspace:^", "@backstage/plugin-lighthouse-backend": "workspace:^", "@backstage/plugin-linguist-backend": "workspace:^", diff --git a/packages/backend-next/src/index.ts b/packages/backend-next/src/index.ts index 68e33f4be3..04ddd838c8 100644 --- a/packages/backend-next/src/index.ts +++ b/packages/backend-next/src/index.ts @@ -29,7 +29,6 @@ backend.add( backend.add(import('@backstage/plugin-catalog-backend/alpha')); backend.add(import('@backstage/plugin-devtools-backend')); backend.add(import('@backstage/plugin-entity-feedback-backend')); -backend.add(import('@backstage/plugin-graphql-backend')); backend.add(import('@backstage/plugin-kubernetes-backend/alpha')); backend.add(import('@backstage/plugin-lighthouse-backend')); backend.add(import('@backstage/plugin-linguist-backend')); diff --git a/plugins/graphql-backend/README.md b/plugins/graphql-backend/README.md index d1bd53b38d..970222fb1f 100644 --- a/plugins/graphql-backend/README.md +++ b/plugins/graphql-backend/README.md @@ -26,19 +26,3 @@ yarn workspace example-backend start ``` This will launch the full example backend. - -### New Backend System - -The grahpql backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: -In your `packages/backend/src/index.ts` make the following changes: - -```diff -import { createBackend } from '@backstage/backend-defaults'; - -const backend = createBackend(); - -backend.add(import('@backstage/plugin-graphql-backend')); -// ... other feature additions - -backend.start(); -``` diff --git a/plugins/graphql-backend/api-report.md b/plugins/graphql-backend/api-report.md index 31cdf4c617..a787c4f209 100644 --- a/plugins/graphql-backend/api-report.md +++ b/plugins/graphql-backend/api-report.md @@ -3,7 +3,6 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; @@ -11,10 +10,6 @@ import { Logger } from 'winston'; // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// @public -const graphqlPlugin: () => BackendFeature; -export default graphqlPlugin; - // @public (undocumented) export interface RouterOptions { // (undocumented) diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 2ed420983e..7582c150cb 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -35,7 +35,6 @@ "dependencies": { "@apollo/server": "^4.0.0", "@backstage/backend-common": "workspace:^", - "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/plugin-catalog-graphql": "workspace:^", "@graphql-tools/schema": "^9.0.0", diff --git a/plugins/graphql-backend/src/index.ts b/plugins/graphql-backend/src/index.ts index 5c21db501f..a9f7f92ad9 100644 --- a/plugins/graphql-backend/src/index.ts +++ b/plugins/graphql-backend/src/index.ts @@ -21,4 +21,3 @@ */ export * from './service/router'; -export { graphqlPlugin as default } from './plugin'; diff --git a/plugins/graphql-backend/src/plugin.ts b/plugins/graphql-backend/src/plugin.ts deleted file mode 100644 index 6401f87803..0000000000 --- a/plugins/graphql-backend/src/plugin.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2023 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { - coreServices, - createBackendPlugin, -} from '@backstage/backend-plugin-api'; -import { createRouter } from './service/router'; -import { loggerToWinstonLogger } from '@backstage/backend-common'; - -export const graphqlPlugin = createBackendPlugin({ - pluginId: 'graphql', - register(env) { - env.registerInit({ - deps: { - config: coreServices.rootConfig, - http: coreServices.httpRouter, - logger: coreServices.logger, - }, - async init({ config, http, logger }) { - http.use( - await createRouter({ - config, - logger: loggerToWinstonLogger(logger), - }), - ); - }, - }); - }, -}); diff --git a/yarn.lock b/yarn.lock index 04215cd079..3f7ffd754b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7280,7 +7280,6 @@ __metadata: dependencies: "@apollo/server": ^4.0.0 "@backstage/backend-common": "workspace:^" - "@backstage/backend-plugin-api": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/plugin-catalog-graphql": "workspace:^" @@ -25962,7 +25961,6 @@ __metadata: "@backstage/plugin-catalog-backend-module-unprocessed": "workspace:^" "@backstage/plugin-devtools-backend": "workspace:^" "@backstage/plugin-entity-feedback-backend": "workspace:^" - "@backstage/plugin-graphql-backend": "workspace:^" "@backstage/plugin-kubernetes-backend": "workspace:^" "@backstage/plugin-lighthouse-backend": "workspace:^" "@backstage/plugin-linguist-backend": "workspace:^"