UNPKG

681 BTypeScriptView Raw
1import { DirectiveDefinitionNode, FieldDefinitionNode, InputValueDefinitionNode, NameNode } from 'graphql';
2import { Config } from './merge-typedefs.js';
3type FieldDefNode = FieldDefinitionNode | InputValueDefinitionNode;
4type NamedDefNode = {
5 name: NameNode;
6};
7export type OnFieldTypeConflict = (existingField: FieldDefNode, otherField: FieldDefNode, type: NamedDefNode, ignoreNullability: boolean | undefined) => FieldDefNode;
8export declare function mergeFields<T extends FieldDefNode>(type: {
9 name: NameNode;
10}, f1: ReadonlyArray<T> | undefined, f2: ReadonlyArray<T> | undefined, config?: Config, directives?: Record<string, DirectiveDefinitionNode>): T[];
11export {};