Focusing hard x-ray free-electron laser radiation with extremely high fluence sets stringent demands on the x-ray optics. Any material placed in an intense x-ray beam is at risk of being damaged. Therefore, it is crucial to find the damage thresholds for focusing optics. In this paper we report experimental results of exposing tungsten and diamond diffractive optics to a prefocused 8.2 keV free-electron laser beam in order to find damage threshold fluence levels. Tungsten nanostructures were damaged at fluence levels above 500 mJ/cm(2). The damage was of mechanical character, caused by thermal stress variations. Diamond nanostructures were affected at a fluence of 59 000 mJ/cm(2). For fluence levels above this, a significant graphitization process was initiated. Scanning Electron Microscopy (SEM) and mu-Raman analysis were used to analyze exposed nanostructures.