import { GraphQLInterfaceType, GraphQLObjectType, GraphQLSchema, parseType, DocumentNode, GraphQLField, GraphQLNamedType, GraphQLOutputType } from 'graphql'; import { GeneContext } from 'graphql-gene/context'; import { AnyObject, FieldLines, GraphQLVarType, TypeDefLines, TypeOrFunction } from '../types'; import { GeneConfig, GeneTypeConfig } from '../defineConfig'; export * from './extend'; type GraphQLOutputObjectType = GraphQLObjectType | GraphQLInterfaceType; export declare function parseSchemaOption(schema: GraphQLSchema | DocumentNode | string | undefined, scalars?: string[]): GraphQLSchema | undefined; export declare function lookDeepInSchema(options: { each: (details: { field: string; fieldDef: GraphQLField | undefined, GeneContext, Record | undefined>; isList: boolean; isNonNullable: boolean; parentType: string; parentTypeDef: GraphQLOutputObjectType; state: TState; type: string; typeDef: GraphQLNamedType; }) => TState | undefined; schema: GraphQLSchema; state?: TState; }): void; export declare function findAccurateTypeDef(type: GraphQLOutputType): GraphQLInterfaceType | import('graphql').GraphQLEnumType | import('graphql').GraphQLUnionType | import('graphql').GraphQLScalarType | GraphQLObjectType | undefined; export declare function getGraphqlType(variable: string | number | boolean | string[] | number[] | boolean[]): string; /** * Inspired by * @see https://github.com/graphql/graphql-js/issues/869#issuecomment-374351118 */ export declare function printSchemaWithDirectives(schema: GraphQLSchema): string; /** is using default Gene resolver if `resolver` or `args` option is set to "default" */ export declare function isUsingDefaultResolver(fieldConfig: AnyObject): boolean; export declare function getDefaultTypeDefLinesObject(): TypeDefLines[0]; export declare function getDefaultFieldLinesObject(): FieldLines[0]; export declare function isObject(variable: T): variable is T & object; export declare function isEmptyObject(obj: T): boolean; export declare function isArrayFieldConfig(fieldConfigs: T): fieldConfigs is Extract; export declare function isObjectFieldConfig(fieldConfigs: T): fieldConfigs is Exclude; export declare function normalizeFieldConfig>(fieldConfig: TConfig): GeneTypeConfig; export declare function isListType(type: ReturnType): boolean; export declare function findTypeNameFromTypeNode(type: ReturnType): string; export declare function getFieldDefinition(options: { schema: GraphQLSchema; parent: string; field: string; }): GraphQLField | undefined; /** * Receives the full GraphQL return type and returns the type name as string. * * @example * const returnTypeName = getReturnTypeName('[Foo!]!') // => 'Foo' */ export declare function getReturnTypeName(returnType: string): string; export declare function getGeneConfigFromOptions(options: { model: M; geneConfig?: GeneConfig; }): GeneConfig | undefined; export declare function parseGetterConfig(config: TypeOrFunction): T; export declare function isFieldIncluded(geneConfig: GeneConfig | undefined, fieldKey: string): boolean; export declare function createTypeDefLines(typeDefLines: TypeDefLines, varType: GraphQLVarType, varName: string): void;