Merge branch 'master' of github.com:spotify/backstage into mob/union-types

This commit is contained in:
blam
2020-08-12 02:03:07 +02:00
165 changed files with 18150 additions and 237 deletions
+27 -2
View File
@@ -1,3 +1,28 @@
# graphql
# GraphQL Backend
## TODO
## 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`:
```ts
const graphqlEnv = useHotMemoize(module, () => createEnv('graphql'));
const service = createServiceBuilder(module)
.loadConfig(configReader)
/** several different routers */
.addRouter('/graphql', await graphql(graphqlEnv));
```
2. Start the backend
```bash
yarn workspace example-backend start
```
This will launch the full example backend.