import { DefinitionNode, DocumentNode } from "graphql"; import type { Readable } from "svelte/store"; export declare type GFetchQueryDefault = { errors?: string[]; }; declare type OptionalPropertyNames = { [K in keyof T]-?: {} extends { [P in K]: T[K]; } ? K : never; }[keyof T]; declare type SpreadProperties = { [P in K]: L[P] | Exclude; }; declare type Id = T extends infer U ? { [K in keyof U]: U[K]; } : never; declare type SpreadTwo = Id> & Pick>> & Pick, keyof L>> & SpreadProperties & keyof L>>; declare type Spread = A extends [infer L, ...infer R] ? SpreadTwo> : unknown; export declare type GFetchQueryResult = { [k: string]: F; }; export declare type GFetchQueries = { query: DocumentNode; variables?: Record; }; export declare function gqlToString(tag: DocumentNode): string; /** * Finds the Name value from the OperationDefinition of a Document */ export declare const getOperationName: (query: DocumentNode) => string | undefined; export declare const stringifyDocument: (node: string | DefinitionNode | DocumentNode) => string; declare type gFetchProperties = { queries: GFetchQueries[]; fetch: typeof fetch; }; export declare type ApolloClientOptions = { path?: string; }; export declare type ApolloClient = { path?: string; }; export declare type GFetchReturn = { data: T; errors?: Error; }; export declare type GGetParameters = { variables?: Variables; fetch: typeof fetch; }; export declare type GFetchReturnWithErrors = Spread<[T, GFetchQueryDefault]>; export declare class GFetch extends Object { path: string; constructor(options: ApolloClientOptions); fetch({ queries, fetch, }: gFetchProperties): Promise>; oFetch({ queries, }: { queries: GFetchQueries[]; }): Readable>; private unsubscribe; private makeSubscribe; private fetchDataForSubscription; } export declare const data: import("svelte/store").Writable; export {};