import { faker } from '@faker-js/faker/locale/en'; import type { GraphQLSchema, GraphQLType, GraphQLObjectType } from 'graphql'; import type { DocumentNode, GraphQLOperation } from 'graphql-typed'; import type { IfEmptyObject, IfAllNullableKeys } from '@shopify/useful-types'; import type { Field, InlineFragment } from 'graphql-tool-utilities'; export { faker }; export interface FieldMetadata { fieldIndex?: number; fieldName: string; responseName: string; } export type FieldDetails = (Field | InlineFragment) & FieldMetadata; export interface ResolveDetails { type: GraphQLType; parent: GraphQLObjectType; field: FieldDetails; parentFields: FieldDetails[]; } export interface Resolver { (request: Request, details: ResolveDetails): T; } export type Thunk = T | Resolver; export type DeepThunk = (T extends object ? { [P in keyof T]: Thunk>[] : (T[P] extends ReadonlyArray ? ReadonlyArray>> : (T[P] extends infer U ? DeepThunk : T[P]) | null | undefined) | null | undefined) | null | undefined>; } : T) | null | undefined; export type GraphQLFillerData = Operation extends GraphQLOperation ? Thunk : Request, DeepThunk : Request, PartialData>> : never; export interface Options | null = GraphQLRequest | null> { resolvers?: { [key: string]: Resolver; }; } export type GraphQLRequest = { query: DocumentNode; operationName?: string; } & IfEmptyObject>; export declare function createFiller(schema: GraphQLSchema, { resolvers: customResolvers, }?: Options>): (_document: GraphQLOperation, data?: GraphQLFillerData>) => (request: GraphQLRequest) => Data; export declare function createFillers(schema: GraphQLSchema, options?: Options | null>): { fillFragment(type: DocumentNode, data?: GraphQLFillerData>): Data; fillOperation: (_document: GraphQLOperation, data?: Thunk, DeepThunk, PartialData_1>>) => (request: GraphQLRequest) => Data_1; }; export declare function list(size: number | [number, number], partial?: Thunk): Thunk[]; //# sourceMappingURL=fill.d.ts.map