bug(gql): use import to import the graphql module

This commit is contained in:
blam
2020-09-23 16:08:34 +02:00
parent 2dc6a3213c
commit c2d34c9b33
@@ -22,6 +22,7 @@ import { Config } from '@backstage/config';
import { CatalogClient } from '../service/client';
import GraphQLJSON, { GraphQLJSONObject } from 'graphql-type-json';
import { Entity } from '@backstage/catalog-model';
import typeDefs from '../schema';
export interface ModuleOptions {
logger: Logger;
@@ -31,8 +32,6 @@ export interface ModuleOptions {
export async function createModule(
options: ModuleOptions,
): Promise<GraphQLModule> {
const { default: typeDefs } = require('../schema');
const catalogClient = new CatalogClient(
options.config.getString('backend.baseUrl'),
);