UNPKG

@ardatan/openapi-to-graphql

Version:

Generates a GraphQL schema for a given OpenAPI Specification (OAS)

22 lines (21 loc) 839 B
import { Operation } from './types/operation'; import { ResolveFunction } from './types/graphql'; import { PreprocessingData } from './types/preprocessing_data'; declare type GetResolverParams = { operation: Operation; argsFromLink?: { [key: string]: string; }; payloadName?: string; data: PreprocessingData; baseUrl?: string; requestOptions?: RequestInit; }; export declare type ResolverMiddleware = (getResolverParams: GetResolverParams, factory: ResolverFactory) => ResolveFunction; declare type ResolverFactory = typeof getResolver; /** * Creates and returns a resolver function that performs API requests for the * given GraphQL query */ export declare function getResolver({ operation, argsFromLink, payloadName, data, baseUrl, requestOptions }: GetResolverParams): ResolveFunction; export {};