0π
β
The extractZMockClient has implicitly a promise returned that resolves with your returned value. To get your value use
extractZMockClient().then(function(result){
// create your apollo
})
result corresponds to your return in extractZMockClient
Recomendation: throw away the extract and just use
ZMockClient().then((response)=>{
// dostuff
}).catch((error)=>{console.error(error)})
since you use it with await it returns a promise π
-1π
I think you are missing an await
here:
const ZMockClient = async () => await import("z-mock-client")
Source:stackexchange.com