diff --git a/.changeset/migrate-1713466081822.md b/.changeset/migrate-1713466081822.md new file mode 100644 index 0000000000..e2a9481158 --- /dev/null +++ b/.changeset/migrate-1713466081822.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-graphql-voyager': patch +--- + +These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. diff --git a/plugins/graphql-voyager/README.md b/plugins/graphql-voyager/README.md index d37ffdecca..84b3e565c5 100644 --- a/plugins/graphql-voyager/README.md +++ b/plugins/graphql-voyager/README.md @@ -1,76 +1,3 @@ -# graphql-voyager +# Deprecated -Welcome to the graphql-voyager plugin! - -Presents a graph structure of your entire GraphQL API, with tabs for multiple API urls: -![](./src/assets/plugin.png) - -## Getting started - -### Installing - -To get started, first install the plugin with the following command: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-graphql-voyager -``` - -### Adding the page - -In order to be able to navigate to the graphQL voyager page, a new route needs to be added to the app. This can be done in the following way: - -```tsx -// packages/app/App.tsx - - import { GraphQLVoyagerPage } from '@backstage/plugin-graphql-voyager'; - - const routes = ( - - }/> -``` - -### Configuration - -In order for the plugin to function correctly. GraphQL endpoints need to be added / configured through the GraphQLVoyager API. This can be done by implementing the `graphQlVoyagerApiRef` exported by this plugin. - -Add your own configuration to the `packages/app/src/apis.ts` file the following way: - -```ts -import { identityApiRef } from '@backstage/core-plugin-api'; -import { GraphQLVoyagerEndpoints } from '@backstage/plugin-graphql-voyager'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: graphQlVoyagerApiRef, - deps: { identityApi: identityApiRef }, - factory: ({ identityApiRef }) => { - return GraphQLVoyagerEndpoints.from([ - { - id: `graphql-voyager-endpoint-id`, - title: 'endpoint-title', - introspectionErrorMessage: - 'Unable to perform introspection, make sure you are on the correct environment.', - introspection: async (query: any) => { - const token = 'someSecretJWTComingFromIdentityApiRef'; - - const res = await fetch('graphQLEndpoint', { - method: 'POST', - body: JSON.stringify({ query }), - headers: { - 'Content-Type': 'application/json', - Authorization: token, - }, - }); - - return res.json(); - }, - voyagerProps: { - hideDocs: true, - }, - }, - ]); - }, - }), -]; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-graphql-voyager` instead. diff --git a/plugins/graphql-voyager/package.json b/plugins/graphql-voyager/package.json index f7d8c49bea..d60ef8b6d9 100644 --- a/plugins/graphql-voyager/package.json +++ b/plugins/graphql-voyager/package.json @@ -1,33 +1,37 @@ { "name": "@backstage/plugin-graphql-voyager", - "description": "Backstage plugin for GraphQL Voyager", "version": "0.1.16", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "description": "Backstage plugin for GraphQL Voyager", + "backstage": { + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-graphql-voyager" + }, "publishConfig": { "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, - "backstage": { - "role": "frontend-plugin" - }, "homepage": "https://backstage.io", "repository": { "type": "git", "url": "https://github.com/backstage/backstage", "directory": "plugins/graphql-voyager" }, + "license": "Apache-2.0", "sideEffects": false, + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist" + ], "scripts": { - "start": "backstage-cli package start", "build": "backstage-cli package build", - "lint": "backstage-cli package lint", - "test": "backstage-cli package test", "clean": "backstage-cli package clean", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/core-components": "workspace:^", @@ -37,11 +41,6 @@ "graphql-voyager": "^1.0.0-rc.31", "react-use": "^17.2.4" }, - "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", - "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - }, "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", @@ -49,7 +48,10 @@ "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^15.0.0" }, - "files": [ - "dist" - ] + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-router-dom": "6.0.0-beta.0 || ^6.3.0" + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-graphql-voyager instead." }