UNPKG

@graphql-inspector/cli

Version:

Tooling for GraphQL. Compare GraphQL Schemas, check documents, find breaking changes, find similar types.

25 lines (24 loc) 1.63 kB
import { ConstValueNode, DocumentNode, FieldNode, GraphQLArgument, GraphQLError, GraphQLInputField, GraphQLInputType, GraphQLNamedType, GraphQLOutputType, GraphQLSchema, Kind } from 'graphql'; type GraphQLInputValue = (GraphQLArgument | GraphQLInputField) & { default?: { literal: ConstValueNode; value?: never; } | { value: unknown; literal?: never; }; }; export declare function getDefaultValue(inputValue: GraphQLInputValue): unknown; export declare function hasDefaultValue(inputValue: GraphQLInputValue): boolean; export declare function defaultValuesAreEqual(oldInputValue: GraphQLInputValue | null | undefined, newInputValue: GraphQLInputValue): boolean; export declare function safeChangeForField(oldType: GraphQLOutputType, newType: GraphQLOutputType): boolean; export declare function safeChangeForInputValue(oldType: GraphQLInputType, newType: GraphQLInputType): boolean; export declare function getKind(type: GraphQLNamedType): Kind; export declare function getTypePrefix(type: GraphQLNamedType): string; export declare function isPrimitive(type: GraphQLNamedType | string): boolean; export declare function isForIntrospection(type: GraphQLNamedType | string): boolean; export declare function findDeprecatedUsages(schema: GraphQLSchema, ast: DocumentNode): Array<GraphQLError>; export declare function removeFieldIfDirectives(node: FieldNode, directiveNames: string[]): FieldNode | null; export declare function removeDirectives(node: FieldNode, directiveNames: string[]): FieldNode; export declare function getReachableTypes(schema: GraphQLSchema): Set<string>; export {};