import type { GraphQLSchema } from "graphql/index.js"; import { type RawConfig } from "./config.js"; import { type TypeInfo } from "./schema-scanner.js"; export type MockObject = Record; /** * Factory function that creates a mock instance for a type. * Each call generates a fresh instance with unique IDs. * Pass `{ depth: maxDepth }` or higher to get scalar-only fields without recursive expansion. */ export type MockFactory = (opts?: { depth?: number; defaultFields?: Record; }) => Record; export type CreateMockOptions = { schema: GraphQLSchema; } & Partial; export type CreateMockResult = { ok: true; code: string; mock: MockObject; /** * Factory functions keyed by type name (e.g., "Organization"). * Each factory creates a fresh mock instance with unique IDs. * Used by the server for lazy mock resolution with @graphql-tools/mock. */ factories: Record; /** * Fields that are intentionally empty arrays (e.g., @error directive). * Map of typeName -> Set of fieldNames. * The server should NOT generate list resolvers for these fields. */ emptyListFields: Map>; } | { ok: false; code: string; typeInfos: TypeInfo[]; error: Error; }; /** * Create mock object from schema * It supports @example directive */ export declare const createMock: (options: CreateMockOptions) => Promise; //# sourceMappingURL=createMock.d.ts.map