Files
backstage/plugins/graphql
2020-09-02 16:17:40 +02:00
..
2020-09-01 14:10:22 +02:00
2020-08-11 12:21:15 +02:00

GraphQL Backend

Getting Started

This backend plugin can be started in a standalone mode from directly in this package with yarn start. However, it will have limited functionality and that process is most convenient when developing the plugin itself.

To run it within the backend do:

  1. Register the router in packages/backend/src/index.ts:
const graphqlEnv = useHotMemoize(module, () => createEnv('graphql'));

const service = createServiceBuilder(module)
  .loadConfig(configReader)
  /** several different routers */
  .addRouter('/graphql', await graphql(graphqlEnv));
  1. Start the backend
yarn workspace example-backend start

This will launch the full example backend.