assertValidName.d.ts 361 B

123456789101112131415
  1. import { GraphQLError } from '../error/GraphQLError';
  2. import { ASTNode } from '../language/ast';
  3. /**
  4. * Upholds the spec rules about naming.
  5. */
  6. export function assertValidName(name: string): string;
  7. /**
  8. * Returns an Error if a name is invalid.
  9. */
  10. export function isValidNameError(
  11. name: string,
  12. node?: ASTNode | undefined,
  13. ): GraphQLError | undefined;