Skip to content

Commit

Permalink
fix: a few more issues with 15
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Feb 16, 2020
1 parent 6a327df commit 00f36cc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
17 changes: 17 additions & 0 deletions packages/graphiql/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ShowHintOptions as HintOptions } from 'codemirror';
import { GraphQLType } from 'graphql';
import { Options as PrintSchemaOptions } from 'graphql/utilities/printSchema';

declare namespace GraphiQL {
export type GetDefaultFieldNamesFn = (type: GraphQLType) => string[];
}

declare namespace CodeMirror {
export type ShowHintOptions = HintOptions & { container: HTMLElement | null };
}

declare type Maybe<T> = T | null | undefined;

declare module 'graphql/utilities/schemaPrinter' {
export type Options = PrintSchemaOptions;
}
12 changes: 0 additions & 12 deletions packages/graphiql/src/types.ts

This file was deleted.

3 changes: 2 additions & 1 deletion packages/graphiql/src/utility/introspectionQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import { getOperationAST, parse, getIntrospectionQuery } from 'graphql';

export const staticName = 'introspectionQuery';
const operationDocument = getOperationAST(parse(getIntrospectionQuery()), null);
export const introspectionQuery = getIntrospectionQuery();
const operationDocument = getOperationAST(parse(introspectionQuery), null);

export const introspectionQueryName = operationDocument
? operationDocument.name?.value || staticName
Expand Down

0 comments on commit 00f36cc

Please sign in to comment.