【发布时间】:2019-11-11 08:32:01
【问题描述】:
我有一个 Apollo 服务器:
45 const server = new ApolloServer({
46 resolvers,
47 typeDefs,
48 debug: true,
49 })
在客户端,我收到如下 js 错误:
扩展名:{code: "INTERNAL_SERVER_ERROR",…}
位置:[{line: 3, column: 7}]
0:{行:3,列:7}
消息:“无法读取未定义的属性‘拆分’”
但是运行服务器的节点控制台没有打印任何东西:
node:63865) DeprecationWarning:当前的 URL 字符串解析器已被弃用,并将在未来的版本中删除。要使用新的解析器,请将选项 { useNewUrlParser: true } 传递给 MongoClient.connect。 ???服务器准备就绪http://localhost:4001/ Mongoose 默认连接打开到 mongodb://localhost/gepick (节点:63865)DeprecationWarning:collection.ensureIndex 已弃用。请改用 createIndexes。 (节点:63865)[DEP0005] DeprecationWarning:由于安全性和可用性问题,不推荐使用 Buffer()。请改用 Buffer.alloc()、Buffer.allocUnsafe() 或 Buffer.from() 方法
【问题讨论】:
标签: node.js graphql apollo apollo-server