TypeError: resolver is not a function
As usual, the answer is easy once you put your mind to it.
I was exporting the function incorrectly from the NextJS API file.
Correct method:export default apiNewSession;
Not sure why it still happened when when i was exporting the function by default.