You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a bug when upgrading all packages and the block field suggestions plug-in stopped working. It turns out that @escape.tech/graphql-armor-block-field-suggestions:3.0.0 that comes with @escape.tech/graphql-armor:3.1.5 depends on graphql 16.0.0 instead of 16.10.0 like the other plugins.
In my own project I also depend on the graphql lib and bumped the version to 16.10.0 and after that the plugin stopped working. Downgrading to 16.0.0 fixed it.
If I look at my yarn.lock file it looks as if all modules depend on 16.10.0:
However, the @escape.tech/graphql-armor-block-field-suggestions/package.json file contains:
"dependencies": {
"graphql": "^16.0.0"
},
I did some testing and I believe this is caused by graphql@16.6.0 and up started shipping two library builds side-by-side in the same NPM package (cjs and esm). This causes error instanceof graphql.GraphQLError to fail if mixed usage of CommonJS and ES Module code is used.
Something like this would fix it, but I'm no JS/TS expert:
The text was updated successfully, but these errors were encountered:
bramklg
changed the title
graphql-armor-block-field-suggestions 3.0.0 depends on graphql 16.0.0 instead of 16.10.0
graphql-armor-block-field-suggestions 3.0.0 depends on graphql 16.0.0 instead of 16.10.0 causing it to fail in some situations
May 3, 2025
Uh oh!
There was an error while loading. Please reload this page.
I encountered a bug when upgrading all packages and the block field suggestions plug-in stopped working. It turns out that
@escape.tech/graphql-armor-block-field-suggestions:3.0.0
that comes with@escape.tech/graphql-armor:3.1.5
depends on graphql16.0.0
instead of16.10.0
like the other plugins.In my own project I also depend on the graphql lib and bumped the version to
16.10.0
and after that the plugin stopped working. Downgrading to16.0.0
fixed it.If I look at my
yarn.lock
file it looks as if all modules depend on16.10.0
:However, the
@escape.tech/graphql-armor-block-field-suggestions/package.json
file contains:I did some testing and I believe this is caused by
graphql@16.6.0
and up started shipping two library builds side-by-side in the same NPM package (cjs and esm). This causeserror instanceof graphql.GraphQLError
to fail if mixed usage of CommonJS and ES Module code is used.Something like this would fix it, but I'm no JS/TS expert:
This is also how plugins from
@envelop
check it https://github.com/graphql-hive/envelop/blob/main/packages/core/src/plugins/use-masked-errors.ts#L14I 'fixed' it in my project with
The text was updated successfully, but these errors were encountered: