UNPKG

@graphql-hive/external-composition

Version:

Compose schemas outside GraphQL Hive

31 lines 883 B
export type ErrorCode = 'ERR_EMPTY_BODY' | 'ERR_INVALID_SIGNATURE'; export declare const signatureHeaderName = "x-hive-signature-256"; export declare function verifyRequest(input: { body: string; signature: string; secret: string; }): ErrorCode | undefined; export interface CompositionSuccess { type: 'success'; result: { supergraph: string; sdl: string; }; } export interface CompositionFailure { type: 'failure'; result: { errors: Array<{ message: string; source: 'graphql' | 'composition'; }>; }; } type Input = Array<{ sdl: string; name: string; url?: string; }>; export declare function compose(composition: (input: Input) => CompositionSuccess | CompositionFailure): (input: Input) => CompositionSuccess | CompositionFailure; export {}; //# sourceMappingURL=index.d.ts.map