【发布时间】:2021-05-06 01:00:52
【问题描述】:
我正在使用 NEST.JS 框架,想添加 external 插件 New Relic Apollo Server plugin。
apollo-server-fastify: "^2.19.2"
@newrelic/apollo-server-plugin: "^0.1.2"
import { apolloServerNewRelicPlugin } from '@newrelic/apollo-server-plugin';
GraphQLModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
....
plugins: [apolloServerNewRelicPlugin],
}),
-
当我启动服务器进行 e2e 测试时,它需要真正的 NewRelic 密钥;有没有不需要真正的密钥就可以开始测试环境的方法?
-
为了测试我用真实密钥启动服务器的东西; Missing Key and cannot start agent 错误消失了,但下面是我看到的错误
UnhandledPromiseRejectionWarning: TypeError: Cannot use 'in' operator to search for '__internal_plugin_id__' in undefined
my-application | at Object.pluginIsInternal (/usr/src/app/node_modules/apollo-server-fastify/node_modules/apollo-server-core/dist/plugin/internalPlugin.js:5:37)
【问题讨论】:
-
你用的是什么版本的nodejs?
-
节点版本 12.18
标签: node.js graphql nestjs apollo-server newrelic