Reputation: 11
Looking around in documentation relating to graphQL. I have not been able to find out how to time out a query that is taking a long time to return a response.
The server can be started with :
server.listen(4000, '0.0.0.0') => {
console.log(Server ready
);
});
Any help would be appreciated.
Upvotes: 1
Views: 397
Reputation: 172
You can set the timeout by adding:
server.listen(4000, '0.0.0.0') => { console.log(Server ready); })
.then(s => s.setTimeout(<your timeout in millis>));;
Upvotes: 1