Thank you for your attention!
I decided to transfer my REST API(Express) to GraphGL.
Everything worked before adding subscribers.
Now all models return Timeout:
If I clean the model, then it can return something to me:
Here is the code: https://codesandbox.io/s/zen-cohen-7o74v?file=/models/owner.js
I forgot to add:
require("dotenv").config();
const mongoose = require("mongoose");
...
// mongoose
mongoose
.connect(process.env.DB_HOST, {
useNewUrlParser: true,
useUnifiedTopology: true,
})
.then(() => console.log("MongoDB connected"))
.catch((err) => console.log(err));