From 6552ac3aca560a97327a81c0a1dce4d24c232953 Mon Sep 17 00:00:00 2001 From: Toan Date: Sat, 4 May 2024 01:02:56 +0700 Subject: [PATCH] fix(ESM package): QueryComplexity import CJS module from GraphQL --- .mocharc.json | 3 +++ src/QueryComplexity.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .mocharc.json diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 0000000..efafb6e --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,3 @@ +{ + "node-option": ["experimental-specifier-resolution=node"] +} diff --git a/src/QueryComplexity.ts b/src/QueryComplexity.ts index 41dee1e..e0652b5 100644 --- a/src/QueryComplexity.ts +++ b/src/QueryComplexity.ts @@ -8,7 +8,7 @@ import { getArgumentValues, getDirectiveValues, getVariableValues, -} from 'graphql/execution/values.js'; +} from 'graphql/execution/values'; import { ValidationContext,