【发布时间】:2019-11-25 04:33:59
【问题描述】:
对于快递的描述在
how to properly close node-express server?
但在瑜伽文档中
https://github.com/prisma/graphql-yoga
没有关于close 方法的信息。
更新
@perdox 的解决方案解决了我的问题,正确答案是:
const gqlServer = new GraphQLServer({ typeDefs, resolvers });
const server = gqlServer.start(() => console.log('Server is running on localhost:4000'));
(async function f() {
(await server).close();
})();
【问题讨论】:
标签: express graphql-js prisma-graphql