apollo-schema-extend
Version:
Extends your Apollo Server Express based graphql server with an external graphql source
14 lines (13 loc) • 1.03 kB
TypeScript
import { ASTKindToNode, ASTNode, DirectiveNode, ExecutableDefinitionNode, FieldNode, InlineFragmentNode, SelectionNode } from 'graphql';
import { WithRequired } from './astTypes';
/**
* Curried TypeGuard for any kind of node
* @param kind the kind of node
* @param node the node to verify
*/
export declare function isNodeKind<TKind extends keyof ASTKindToNode>(kind: TKind): (node: ASTNode) => node is ASTKindToNode[TKind];
export declare function isNodeKind<TKind extends keyof ASTKindToNode>(kind: TKind, node: ASTNode): node is ASTKindToNode[TKind];
export declare const hasArguments: (node: ASTNode) => node is WithRequired<FieldNode | DirectiveNode, "arguments">;
export declare const hasDirectives: (node: ASTNode) => node is WithRequired<SelectionNode | ExecutableDefinitionNode, "directives">;
export declare const hasSelectionSet: (node: ASTNode) => node is WithRequired<FieldNode | InlineFragmentNode | ExecutableDefinitionNode, "selectionSet">;
export declare const isFieldNode: (node: ASTNode) => node is FieldNode;