Giter Site home page Giter Site logo

Comments (4)

bizob2828 avatar bizob2828 commented on August 17, 2024 2

@DaveHellsmith to fix your issue you will have to put esModuleInterop: true in your ts config file. This was a change in typescript 2.7 that affected some people. You can read more about the option here. I put that in a nest project ts config and now it works just fine. I'm going to close this issue

from newrelic-node-apollo-server-plugin.

bizob2828 avatar bizob2828 commented on August 17, 2024

@DaveHellsmith this plugin works on version 3.x. What made you believe it's only supported on 2.x? I do see #214 which I've already commented on. You can see here it works fine on 3.x.

Folder: apollo-federation
	 * @apollo/subgraph(1): 2.1.1
	 * @apollo/gateway(1): 2.1.1
	 * @opentelemetry/api(1): 1.2.0
	 * apollo-server(1): 3.10.2
	 * graphql(1): 16.6.0
Folder: apollo-server-express
	 * apollo-server-express(2): 2.26.0, 3.10.2
	 * express(1): 4.17.1
	 * graphql(1): 15.8.0
Folder: apollo-server-fastify
	 * apollo-server-fastify(2): 2.26.0, 3.10.2
	 * fastify(1): 3.17.0
	 * graphql(1): 15.8.0
Folder: apollo-server-hapi
	 * apollo-server-hapi(1): 3.10.2
	 * @hapi/hapi(1): 20.2.2
Folder: apollo-server-koa
	 * apollo-server-koa(2): 2.26.0, 3.10.2
	 * graphql(1): 15.8.0
	 * koa(1): 2.13.4
Folder: apollo-server-lambda
	 * apollo-server-lambda(2): 2.26.0, 3.10.2
	 * graphql(1): 15.8.0
Folder: apollo-server
	 * apollo-server(2): 2.26.0, 3.10.2
	 * graphql(1): 15.8.0

I just imported the plugin and it exports the function properly

import createPlugin from '@newrelic/apollo-server-plugin'
console.log(typeof createPlugin)

And you can see it's a function.

❯ node index.js
function

Is this code snippet above typescript or just javascript getting transpiled and/or bundled to work with Nest?

from newrelic-node-apollo-server-plugin.

DaveHellsmith avatar DaveHellsmith commented on August 17, 2024

@bizob2828 it's typescript.

The lockfile specified 2.x and usually when we had issues with apollo plugins it was due to the version mismatch, I am sorry for the ignorance =]

We did have to do a change though to make it work with nestjs, please see the changes in https://github.com/HearMeTeam/newrelic-node-apollo-server-plugin/pull/1/files

from newrelic-node-apollo-server-plugin.

bizob2828 avatar bizob2828 commented on August 17, 2024

Ok I'll try to reproduce. Looking at your PR, that shouldn't be necessary to get it working.

The lockfile specified 2.x and usually when we had issues with apollo plugins it was due to the version mismatch, I am sorry for the ignorance =]

WRT, No worries. package-lock files only apply to local projects. For a 3rd party installed dependency it would be npm-shrinkwrap.json. You can read more about it here

from newrelic-node-apollo-server-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.