assertValidName.d.ts 361 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import { GraphQLError } from '../error/GraphQLError';
import { ASTNode } from '../language/ast';

/**
 * Upholds the spec rules about naming.
 */
export function assertValidName(name: string): string;

/**
 * Returns an Error if a name is invalid.
 */
export function isValidNameError(
  name: string,
  node?: ASTNode | undefined,
): GraphQLError | undefined;