@graphql-codegen/plugin-helpers
Version:
GraphQL Code Generator common utils and types
10 lines (9 loc) • 835 B
text/typescript
import { DocumentNode, GraphQLOutputType, GraphQLSchema } from 'graphql';
import { Types } from './types.cjs';
export declare function isOutputConfigArray(type: any): type is Types.OutputConfig[];
export declare function isConfiguredOutput(type: any): type is Types.ConfiguredOutput;
export declare function normalizeOutputParam(config: Types.OutputConfig | Types.ConfiguredPlugin[] | Types.ConfiguredOutput): Types.ConfiguredOutput;
export declare function normalizeInstanceOrArray<T>(type: T | T[]): T[];
export declare function normalizeConfig(config: Types.OutputConfig | Types.OutputConfig[]): Types.ConfiguredPlugin[];
export declare function hasNullableTypeRecursively(type: GraphQLOutputType): boolean;
export declare function isUsingTypes(document: DocumentNode, externalFragments: string[], schema?: GraphQLSchema): boolean;