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
In GraphQL Mesh, faced internal crashes where API responses were crashing due Access-Control-Allow-Origin header being set with nil value by response server:
"message": "TypeError: Cannot read properties of undefined (reading 'includes')\n at /Users/<user>/Desktop/<project>/graphqlmesh/node_modules/@whatwg-node/node-fetch/cjs/Headers.js:238:37\n at /Users/<user>/Desktop/<project>/graphqlmesh/node_modules/@whatwg-node/node-fetch/cjs/Headers.js:149:25\n at Array.forEach (<anonymous>)\n at PonyfillHeaders.forEach (/Users/<user>/Desktop/<project>/graphqlmesh/node_modules/@whatwg-node/node-fetch/cjs/Headers.js:148:38)\n at PonyfillHeaders.[nodejs.util.inspect.custom] (/Users/<user>/Desktop/<project>/graphqlmesh/node_modules/@whatwg-node/node-fetch/cjs/Headers.js:233:14)\n at formatValue (node:internal/util/inspect:806:19)\n at formatProperty (node:internal/util/inspect:1946:11)\n at formatRaw (node:internal/util/inspect:1055:9)\n at formatValue (node:internal/util/inspect:841:10)\n at Object.inspect (node:internal/util/inspect:365:10)\nThis is caused by either a bug in Node.js or incorrect usage of Node.js internals.\nPlease open an issue with this stack trace at https://github.com/nodejs/node/issues\n",
I'd love to help you and learn more about your use case of GraphQL Mesh. If you give more information at least, we can try to reproduce by ourselves. Thanks!
Describe the bug
In GraphQL Mesh, faced internal crashes where API responses were crashing due
Access-Control-Allow-Origin
header being set with nil value by response server:Root cause seems to be the fact that the library does not guard against nil header values here: https://github.com/ardatan/whatwg-node/blob/master/packages/node-fetch/src/Headers.ts#L266
Should be an easy fix hopefully?
To Reproduce Steps to reproduce the behavior:
Access-Control-Allow-Origin
to undefined/nil in response to a queryEnvironment:
whatwg-node/[email protected]
"@graphql-mesh/cli": "^0.88.6"
@ardatan
The text was updated successfully, but these errors were encountered: