Rd RX810 compatible 1x?
No, not officially.
The authorative document is https://bike.shimano.com/en-EU/product/component/grx-11-speed/RD-RX810.html which says




MODEL NO
RD-RX810




SERIES
GRX 11-speed


Low sprocket_Max.
34T


Low sprocket_Min.
30T


Max. front difference
17T


Top sprocket_Min and Max.
11T


Total capacity
40T




So the minimum and maximum tooth count on your cassette is 11.  That says it has to be 11 tooth.
At the big end, minimum is 30 and maximum is 34 tooth.  Since your desired 40 tooth is more, its out of spec.
Can you make it work?   40 is a long way from 34, and while you could probably push it to 36 without issue, 38 is getting iffy and 40 is unlikely.  It may be possible with a derailleur extender like a tanpan or wolfs tooth, but then you're compromising somewhere else.  Read on...

Separately there's the part of the question about is this going to work with a single chainring.
I'd guess that you're not exceeding capacity, so its nominally no worse than simply riding on one chainring of a double.  You're only using 34-11=23 teeth of capacity.  However the rated &quot;40T capacity&quot; is not all in the rear cassette, its up to 23 teeth in the cassette and up to 17 teeth in the chainring difference.

Upshot 42:34 is not a terrible gear for climbing, but its nowhere near the sub-1:1 range like a triple could give, and not approaching what a compact double could do.  All depends what you want to ride up and how fast.
Answer You want a RD-RX812 which has a 40 or 42 tooth low gear rating.  That would let you use 42:40 as per your question.  You need an 11 speed chain as well, and an 11 speed GRX shifter that suits your bars and brakes.  Downside, 42:11 isn't going to spin you fast on a downhill or a tailwind, but they're not as common with offroad riding so less of an issue.
I'd consider going 42:42 cos the meaning of life at both ends of your transmission is fantastically nerdy.