Merge branch 'master' of github.com:spotify/backstage into mob/catalog-in-gql

* 'master' of github.com:spotify/backstage: (73 commits)
  chore(gql): graphql should be public
  chore(deps): bump chokidar from 3.4.0 to 3.4.1 (#1818)
  chore(deps-dev): bump @types/nodegit from 0.26.5 to 0.26.7 (#1817)
  chore(deps-dev): bump @testing-library/react-hooks from 3.3.0 to 3.4.1 (#1820)
  Mob/techdocs end to end (#1736)
  chore(scaffolder): updating the wording for the sample templates
  chore(deps): bump react-use from 14.2.0 to 15.3.3
  workflows: run cli checks on changes to create-app
  create-app: sync version
  create-app: fix deps
  create-app: add lint command
  feat(create-app): add missing template backend package
  plugins/graphql: fix schema packaging
  create-app: packaging fixes
  fix(create-app): update entrypoint
  feat: fallback to string value if config value is not json
  yarn.lock: security fix (#1797)
  fix(cli): add create-app import to e2e tests
  cli: just print warning if postpack fails
  broken link to create an app
  ...
This commit is contained in:
blam
2020-08-05 05:07:29 +02:00
200 changed files with 4372 additions and 1081 deletions
+1 -2
View File
@@ -6,8 +6,7 @@ _This plugin was created through the Backstage CLI_
## Getting started
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn
start` in the root directory, and then navigating to [/graphql](http://localhost:3000/graphql).
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/graphql](http://localhost:3000/graphql).
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
+3 -3
View File
@@ -4,10 +4,9 @@
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"scripts": {
@@ -43,6 +42,7 @@
"supertest": "^4.0.2"
},
"files": [
"dist"
"dist",
"schema.gql"
]
}
+6 -4
View File
@@ -25,6 +25,11 @@ import { ApolloServer } from 'apollo-server-express';
import { createModule as createCatalogModule } from '@backstage/plugin-catalog-graphql';
import { createModule as createBogusModule } from '@backstage/plugin-bogus-graphql';
const schemaPath = path.resolve(
require.resolve('@backstage/plugin-graphql-backend/package.json'),
'../schema.gql',
);
export interface RouterOptions {
logger: Logger;
}
@@ -32,10 +37,7 @@ export interface RouterOptions {
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
const typeDefs = await fs.promises.readFile(
path.resolve(__dirname, '..', 'schema.gql'),
'utf-8',
);
const typeDefs = await fs.promises.readFile(schemaPath, 'utf-8');
const catalogModule = await createCatalogModule(options);
const bogusModule = await createBogusModule(options);