feat(graphql): added simple graphql service with new backend plugin

This commit is contained in:
blam
2020-07-23 20:21:16 +02:00
parent 360200387e
commit 61257d533a
10 changed files with 57 additions and 15 deletions
+1 -1
View File
@@ -50,7 +50,7 @@
"jest-fetch-mock": "^3.0.3",
"msw": "^0.19.0",
"react-test-renderer": "^16.13.1",
"whatwg-fetch": "^3.0.0"
"whatwg-fetch": "^2.0.0"
},
"files": [
"dist"
+1 -1
View File
@@ -1,3 +1,3 @@
module.exports = {
extends: [require.resolve('@backstage/cli/config/eslint')],
extends: [require.resolve('@backstage/cli/config/eslint.backend')],
};
+5 -4
View File
@@ -25,14 +25,15 @@
"@types/express": "^4.17.6",
"express": "^4.17.1",
"express-promise-router": "^3.0.3",
"yn": "^4.0.0",
"whatwg-fetch": "^3.2.0"
"whatwg-fetch": "^2.0.0",
"winston": "^3.2.1",
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.15",
"@types/supertest": "^2.0.8",
"supertest": "^4.0.2",
"msw": "^0.19.5"
"msw": "^0.19.5",
"supertest": "^4.0.2"
},
"files": [
"dist"
+1
View File
@@ -15,4 +15,5 @@
*/
require('whatwg-fetch');
export * from './service/router';
+2 -2
View File
@@ -34,9 +34,9 @@ describe('createRouter', () => {
jest.resetAllMocks();
});
describe('GET /ping', () => {
describe('GET /health', () => {
it('returns ok', async () => {
const response = await request(app).get('/ping');
const response = await request(app).get('/health');
expect(response.status).toEqual(200);
expect(response.body).toEqual({ status: 'ok' });
+2
View File
@@ -14,3 +14,5 @@
* limitations under the License.
*/
require('whatwg-fetch');
export {};