Merge pull request #2576 from spotify/bug/fix-graphql-importing

bug(gql): use import to import the graphql module
This commit is contained in:
Ben Lambert
2020-09-23 16:24:46 +02:00
committed by GitHub
@@ -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'),
);