UNPKG

apollo-federation-upload-minimal

Version:

This library makes it easier to support file uploads to your federated micro-services. It uses the [Apollo](https://www.apollographql.com/docs/apollo-server/data/file-uploads/) server's solution. It works by simply redirecting the file uploaded stream to

15 lines (14 loc) 674 B
import { GraphQLDataSourceProcessOptions, RemoteGraphQLDataSource } from '@apollo/gateway'; import { GraphQLResponse } from 'apollo-server-types'; declare type ConstructorArgs = Exclude<ConstructorParameters<typeof RemoteGraphQLDataSource>[0], undefined>; export declare type FileUploadDataSourceArgs = ConstructorArgs & { useChunkedTransfer?: boolean; }; export default class FileUploadDataSource extends RemoteGraphQLDataSource { private static extractFileVariables; private addDataHandler; constructor(config?: FileUploadDataSourceArgs); process(args: GraphQLDataSourceProcessOptions): Promise<GraphQLResponse>; private processFiles; } export {};