Fix type overrides of GQL service getSchema

This commit is contained in:
rijkvanzanten
2021-03-30 18:23:00 -04:00
parent 943c27c355
commit 2d316a4a71

View File

@@ -28,6 +28,7 @@ import {
GraphQLError,
GraphQLNonNull,
FragmentDefinitionNode,
GraphQLSchema,
} from 'graphql';
import { getGraphQLType } from '../utils/get-graphql-type';
import { RelationsService } from './relations';
@@ -142,6 +143,9 @@ export class GraphQLService {
/**
* Generate the GraphQL schema. Pulls from the schema information generated by the get-schema util.
*/
getSchema(): GraphQLSchema;
getSchema(type: 'schema'): GraphQLSchema;
getSchema(type: 'sdl'): string;
getSchema(type: 'schema' | 'sdl' = 'schema') {
const self = this;