https://cdn.multitronic.fi/media/a/3/mmo_41700684_1565162938...
I suggest using an 1x PCI-e adapter because putting a M10 in a M.2 slot is likely going to only have 2 of 4 PCI-e lanes in use. You have to figure out the tradeoff of using a Swap on your, now very expensive as well, Flash storage that may have flashier sequential read and write speeds but doesn't have the ability to sustain random read and write performance which is what a Swap is going to use the most.
There are faster Optane drives that use 4 PCI-e lanes or even PCI-e 4.0, but they get pricey quickly, so you should just buy ram then. The deal is the 16GB Optane on an unused 1x PCI-e slot.
What about using one of those fancier enterprise Optane drives (that are also larger) either as a swap or - dedicated drive for writing or reading huge amounts of small files ? The Intel P5800x is the opposite of cheap but from tests I'm seeing the latency and performance is very impressive for some niche use cases