UNPKG

888 BTypeScriptView Raw
1import { Change } from '@graphql-inspector/core';
2import { GraphQLSchema, Source } from 'graphql';
3import { CheckConclusion, ActionResult, PullRequest } from './types';
4export declare type DiffInterceptor = string | {
5 url: string;
6 headers?: {
7 [header: string]: string;
8 };
9};
10export interface DiffInterceptorPayload {
11 pullRequests?: PullRequest[];
12 ref?: string;
13 changes: Change[];
14}
15export declare type DiffInterceptorResponse = {
16 changes: Change[];
17 conclusion?: CheckConclusion;
18};
19export declare function diff({ path, schemas, sources, interceptor, pullRequests, ref, }: {
20 path: string;
21 schemas: {
22 old: GraphQLSchema;
23 new: GraphQLSchema;
24 };
25 sources: {
26 old: Source;
27 new: Source;
28 };
29 interceptor?: DiffInterceptor;
30 pullRequests?: PullRequest[];
31 ref?: string;
32}): Promise<ActionResult>;