code: function createCompilerError(
    message: string,
    locations?: ?$ReadOnlyArray<Location>,
    nodes?: ?$ReadOnlyArray<ASTNode>,
  ): CompilerError {
    let messageWithLocations = message;
    if (locations != null) {
      const printedLocations = printLocations(locations);
      messageWithLocations =
        printedLocations.length === 0
          ? message
          : [message, ...printedLocations].join('\n\n') + '\n';
    }
    const error = new GraphQLError(
      `Internal Error: ${messageWithLocations}`,
      nodes ?? [],
    );
    return new Error(error.message);
  }
docs: Creates an error describing a problem with the compiler itself - such
  as a broken invariant - that must be fixed within the compiler.