UNPKG

@omnigraph/thrift

Version:
27 lines (26 loc) 1.28 kB
import { GraphQLDirective, GraphQLScalarType, GraphQLSchema } from 'graphql'; import type { ThriftDocument } from '@creditkarma/thrift-parser'; import type { ImportFn, Logger, MeshFetch } from '@graphql-mesh/types'; export interface GraphQLThriftLoaderOptions { subgraphName: string; source: string; endpoint: string; operationHeaders?: Record<string, string>; serviceName: string; baseDir?: string; schemaHeaders?: Record<string, string>; fetchFn?: MeshFetch; logger?: Logger; importFn?: ImportFn; } export declare const FieldTypeMapScalar: GraphQLScalarType<unknown, unknown>; export declare const fieldTypeMapDirective: GraphQLDirective; export declare function loadNonExecutableGraphQLSchemaFromIDL({ subgraphName, source, endpoint, operationHeaders, serviceName, baseDir, schemaHeaders, fetchFn, logger, importFn, }: GraphQLThriftLoaderOptions): Promise<GraphQLSchema>; export declare function loadNonExecutableGraphQLSchemaFromThriftDocument({ subgraphName, baseNamespace, namespaceASTMap, location, headers, serviceName, }: { subgraphName: string; baseNamespace: string; namespaceASTMap: Record<string, ThriftDocument>; location: string; headers: Record<string, string>; serviceName: string; }): GraphQLSchema;