Repository navigation
feat: added support for graphql v17 - #2642
Conversation
0b2b318 to
f14c630
Compare
|
https://www.graphql-js.org/upgrade-guides/v16-v17/ We can temporarily skip apollo server - the PR to support v17 is already open though. |
Added support for the harness API, which is the new default for execution commands. We can add more in the future if there are no critical items. wdyt ? |
|
Could you please run ESM tests on this branch?
Could you please list anything which affects our instrumentation or is not covered? Ty |
| // For graphql >= v17: ships as module-sync ESM (index.mjs) on Node 22+. | ||
| // require('graphql') resolves to index.mjs | ||
| // graphqlExports.defaultHarness is the live harness.mjs object that graphql() calls directly | ||
| hook.onModuleLoad('graphql', graphqlExports => { |
There was a problem hiding this comment.
We can add any features later, yes. We just want to create a follow-up ticket in case there is new functions or features we have to cover. |
Previously also we were only shimming the execute method only.
so we can consider adding |
fdbc929 to
6ff328f
Compare
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "dependencies": { | |||
| "@apollo/server": "latest", | |||
There was a problem hiding this comment.
Lets also add that to the follow up graphql JIRA 👍
We can re-test when the release for v17 support is out
| serverControls = new ProcessControls({ | ||
| dirname: __dirname, | ||
| appName: 'apolloServer', | ||
| appName: mode === 'raw' ? 'rawGraphQLServer' : 'apolloServer', |
There was a problem hiding this comment.
Was that a bug? We changed the logic here
There was a problem hiding this comment.
This isn't a bug.
I removed the Apollo Server test from the GraphQL v17 setup. If that file is loaded, it causes issues because Apollo Server currently depends on GraphQL v16. As a result, both GraphQL v16 and v17 end up being loaded, which triggers the following error:
Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior.
With the Apollo Server test removed, the setup is now clean and the correct mode loads the correct files.
There was a problem hiding this comment.
I can't follow this change, is this cause a change in v16 test flow?
There was a problem hiding this comment.
Yeah, it will change the app itself. I would say previously it was wrong :D
It did not create any issues earlier because this was suppressed test, so it doesn't matter which app it actually started
| }; | ||
|
|
||
| function instrumentGraphQL(graphqlExports) { | ||
| // require('graphql') resolves to index.mjs via CJS; nativeEsm covers the case where |
There was a problem hiding this comment.
IMO this does not explain why. I'd remove this comment - see suggestion
There was a problem hiding this comment.
Okay, sure. I'll apply the changes once the current pipeline passes, before merging.
Co-authored-by: kirrg001 <katharina.irrgang@googlemail.com>
d214ae5 to
e03d90c
Compare
|



refs https://jsw.ibm.com/browse/INSTA-97806
release note: https://graphql.org/blog/2026-06-15-introducing-graphql-js-v17/