Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dd-trace v5.22.0 requiring graphql? #4648

Open
dylan-jaris opened this issue Sep 3, 2024 · 3 comments
Open

dd-trace v5.22.0 requiring graphql? #4648

dylan-jaris opened this issue Sep 3, 2024 · 3 comments

Comments

@dylan-jaris
Copy link

Hello,

GH dependabot has made a PR in my repo to update dd-trace from v5.21.0 to v5.22.0. Checking out the feature branch locally, I'm met with these errors on app startup stating that dd-trace could not resolve these graphql packages. Is this correct?? Is dd-trace now requiring graphql?
364076623-f3582640-694d-4152-8519-1d09d66c5141

@Romack
Copy link

Romack commented Sep 19, 2024

+1 this is an issue with all of our typescript projects... I have added graphql as a devDependency in the mean time to get them to build. Should graphql be a dependency instead?

@tlhunter
Copy link
Member

tlhunter commented Oct 3, 2024

The project does not depend on graphql however static analysis tools will discover the packages/datadog-plugin-graphql/src/tools/transforms.js file and the following lines and then freak out:

const visitor_1 = require("graphql/language/visitor");
const printer_1 = require("graphql/language/printer");
const utilities_1 = require("graphql/utilities");

Does anyone have recommendations on how to prevent such tools from parsing the requires? E.g. is there something we can do with string concatenation?

const visitor_1 = require("graphq" + "l/language/visitor");

This sometimes affects users with esbuild projects, too.

@tlhunter
Copy link
Member

tlhunter commented Oct 3, 2024

Funny enough nothing really changed with that file between those two versions of the tracer. Did anything else with your setup change, like the version of TypeScript? The esbuild issue I mentioned has been happening for ages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants