UNPKG

postgraphile-federation-plugin

Version:
36 lines (35 loc) 1.34 kB
/** * These helpers help us to construct AST nodes required for Apollo Federation's printSchema to work. */ import type { DirectiveNode, NameNode, ObjectTypeDefinitionNode, StringValueNode } from "graphql"; /** * Construct AST `name` node required for Apollo Federation's printSchema. * @param value The value. * @returns The AST name node. */ export declare function Name(value: string): NameNode; /** * Construct AST `StringValue` node required for Apollo Federation's printSchema. * @param value The value. * @param block A value indicating whether or not to block. * @returns The AST `stringValue` node. */ export declare function StringValue(value: string, block?: boolean): StringValueNode; /** * Construct AST `ObjectTypeDefinition` node required for Apollo Federation's printSchema. * @param spec The field specification. * @returns The AST `ObjectTypeDefinition` node. */ export declare function ObjectTypeDefinition(spec: { name: string; description?: string | null; }): ObjectTypeDefinitionNode; /** * Construct AST `Directive` node required for Apollo Federation's printSchema. * @param name The GraphQL directive. * @param args The directive args. * @returns The AST `Directive` node. */ export declare function Directive(name: string, args?: { [argName: string]: unknown; }): DirectiveNode;