dd-trace v5.22.0 requiring graphql?
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?
+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?
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.
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.
@Romack @dylan-jaris could you please share your setup that creates the issue? We could try to find ways around the detection in that case.