import type { UnnamedFieldDefinitionNode, UnnamedInputValueDefinitionNode } from './AST'; import type { InputTypeConfig, OutputTypeConfig } from './config'; import type { Resolver, Subscription, TypeResolver } from './Resolver'; import type { ScalarFunctions } from './Scalar'; import type { ReadonlyRecord } from '@principia/base/Record'; import type { Compute } from '@principia/base/util/compute'; import type { _A, ExcludeMatchingProperties } from '@principia/base/util/types'; import type { FieldDefinitionNode, InputObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode, ScalarTypeDefinitionNode, UnionTypeDefinitionNode } from 'graphql'; export declare class GQLField { readonly type: AnyField; readonly args: InputRecord | undefined; readonly resolve: Resolver; readonly _tag = "GQLField"; readonly _R: (_: R) => void; readonly _E: () => E; readonly _A: () => A; readonly ast: UnnamedFieldDefinitionNode; constructor(type: AnyField, args: InputRecord | undefined, resolve: Resolver); static fromAST(ast: UnnamedFieldDefinitionNode, resolve: Resolver): GQLField; [':'](description: string): GQLField; } export declare class GQLScalarField { readonly config: OutputTypeConfig; readonly _tag = "GQLScalarField"; readonly _A: () => A; readonly ast: UnnamedFieldDefinitionNode; constructor(typeName: string, config?: OutputTypeConfig); } export declare class GQLObjectField { readonly config: OutputTypeConfig; readonly _R: (_: R) => void; readonly _E: () => E; readonly _A: () => A; readonly _Root: Root; readonly _Ctx: Ctx; readonly _tag = "GQLObjectField"; readonly ast: UnnamedFieldDefinitionNode; constructor(typeName: string, config?: OutputTypeConfig); } export declare class GQLObject { readonly name: N; readonly fields: { [K in keyof A]: AnyOutput; }; readonly interfaces: ReadonlyArray>; readonly _R: (_: R) => void; readonly _E: () => E; readonly _A: () => A; readonly _Ctx: Ctx; readonly _Root: Root; readonly _tag = "GQLObject"; readonly ast: ObjectTypeDefinitionNode; readonly resolvers: ReadonlyRecord; constructor(name: N, fields: { [K in keyof A]: AnyOutput; }, interfaces?: ReadonlyArray>); } export declare class GQLUnion>, Ctx, A> { readonly name: N; readonly types: Types; readonly resolveType: TypeResolver>; readonly _A: () => A; readonly _E: () => never; readonly _R: (_: unknown) => void; readonly _Ctx: Ctx; readonly _tag = "GQLUnion"; readonly ast: UnionTypeDefinitionNode; constructor(name: N, types: Types, resolveType: TypeResolver>); } export declare class GQLUnionField { readonly config: OutputTypeConfig; readonly _A: () => A; readonly _E: () => never; readonly _R: (_: unknown) => void; readonly _Ctx: Ctx; readonly _tag = "GQLUnionField"; readonly ast: UnnamedFieldDefinitionNode; constructor(typeName: string, config?: OutputTypeConfig); } export declare class GQLInterface { readonly name: N; readonly fields: ReadonlyRecord; readonly resolveType: any; readonly _A: () => A; readonly _E: () => E; readonly _R: (_: R) => void; readonly _Ctx: Ctx; readonly _tag = "GQLInterface"; readonly ast: InterfaceTypeDefinitionNode; readonly resolvers: ReadonlyRecord; constructor(name: N, fields: ReadonlyRecord, resolveType: any); } export declare class GQLSubscription { readonly fields: ReadonlyRecord>; readonly _R: (_: R) => void; readonly _A: () => A; readonly _tag = "GQLSubscription"; readonly ast: ReadonlyArray; readonly resolvers: ReadonlyRecord>; constructor(fields: ReadonlyRecord>); } export declare class GQLSubscriptionField { readonly resolve: Subscription<{}, any, any, any, any, any, any, any>; readonly _A: () => A; readonly _R: (_: R) => void; readonly _tag = "GQLSubscriptionField"; readonly ast: UnnamedFieldDefinitionNode; constructor(type: AnyField, args: InputRecord | undefined, resolve: Subscription<{}, any, any, any, any, any, any, any>); } export declare class GQLExtendObject, R, E, A> { readonly object: O; readonly fields: Record; readonly _R: (_: R) => void; readonly _E: () => E; readonly _A: () => A; readonly _tag = "GQLExtendObject"; readonly ast: ReadonlyArray; readonly resolvers: ReadonlyRecord; constructor(object: O, fields: Record); get name(): O['name']; } export declare class GQLInputObject { readonly name: N; readonly fields: { [K in keyof A]: GQLInputField; }; readonly _A: () => A; readonly _E: () => never; readonly _R: (_: unknown) => void; readonly _tag = "GQLInputObject"; readonly ast: InputObjectTypeDefinitionNode; constructor(name: N, fields: { [K in keyof A]: GQLInputField; }); } export declare class GQLInputField { readonly config: InputTypeConfig; readonly _A: () => A; readonly _tag = "GQLInputField"; readonly ast: UnnamedInputValueDefinitionNode; constructor(typeName: string, config?: InputTypeConfig); } export declare class GQLScalar { readonly ast: ScalarTypeDefinitionNode; readonly name: N; readonly fns: ScalarFunctions; readonly _A: () => O; readonly _R: (_: R) => void; readonly _tag = "GQLScalar"; constructor(ast: ScalarTypeDefinitionNode, name: N, fns: ScalarFunctions); } export declare type AnyField = GQLScalarField | GQLObjectField | GQLUnionField; export declare type AnyOutput = AnyField | GQLField; export declare type InputRecord = Record>; declare type Widen = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T; export declare type FieldRecord = Partial<{ [K in keyof Root]: Root[K] extends { [x: string]: any; } ? GQLObjectField; }> | GQLField; }> : Root[K] extends Iterable ? GQLScalarField> | GQLField> : GQLScalarField> | GQLField | GQLObjectField> | GQLUnionField; }> & { [K in Exclude]: GQLField | GQLScalarField | GQLObjectField | GQLSubscriptionField | GQLUnionField; }; export declare type FieldResolverRecord> = Compute ? Resolver : never; }, never>, 'flat'>; export declare type AnyRootType = GQLInputObject | GQLObject | GQLExtendObject | GQLScalar | GQLSubscription | GQLUnion | GQLInterface; export declare type AnyObjectType = GQLObject | GQLExtendObject; export {}; //# sourceMappingURL=types.d.ts.map