Skip to content

Commit 8ae9d06

Browse files
dependabot[bot]leoromanovsky
authored andcommitted
chore(deps-dev): bump graphql from 16.14.2 to 17.0.2 (#9328)
1 parent 89bcc1d commit 8ae9d06

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

packages/datadog-plugin-graphql/test/tools/signature.spec.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const assert = require('node:assert/strict')
44
const Module = require('node:module')
5+
const path = require('node:path')
56
const { inspect } = require('node:util')
67

78
const { describe, it, before, after } = require('mocha')
@@ -16,9 +17,14 @@ const sinon = require('sinon')
1617
const loadableModule = /** @type {LoadableModule} */ (Module)
1718

1819
// The transforms module reads `globalThis[Symbol.for('dd-trace')].graphql_*`
19-
// at require time, so populate them before requiring the tools.
20-
const visitor = require('graphql/language/visitor')
21-
const printer = require('graphql/language/printer')
20+
// at require time, so populate them before requiring the tools. Requiring by
21+
// absolute path (rather than the `graphql/language/visitor` subpath) bypasses
22+
// graphql's package.json `exports` map, so this always gets the mutable CJS
23+
// module instead of the read-only ES module namespace object that the
24+
// `module-sync` export condition resolves to on Node >=22.
25+
const graphqlRoot = path.dirname(require.resolve('graphql'))
26+
const visitor = require(path.join(graphqlRoot, 'language/visitor.js'))
27+
const printer = require(path.join(graphqlRoot, 'language/printer.js'))
2228
const ddGlobal = globalThis[Symbol.for('dd-trace')]
2329
ddGlobal.graphql_visitor = visitor
2430
ddGlobal.graphql_printer = printer

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,9 +2491,9 @@ graceful-fs@^4.1.15, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
24912491
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
24922492

24932493
graphql@*:
2494-
version "16.14.2"
2495-
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.14.2.tgz#83faf25869e3df727cc855161db5da85b0e5b2c0"
2496-
integrity sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==
2494+
version "17.0.2"
2495+
resolved "https://registry.yarnpkg.com/graphql/-/graphql-17.0.2.tgz#05ff6f18e0801e8d040d46957eba712c1459d5d7"
2496+
integrity sha512-FRWbddMxfkjiB7z+aQDWIR+E34xo9I8c9mtK2RPv8PmMzKRvrdsreHL/Ui/TmwHJfhHChEtsFPyMHKI+xuarQQ==
24972497

24982498
has-flag@^4.0.0:
24992499
version "4.0.0"

0 commit comments

Comments
 (0)