Skip to content

feat: added support for graphql v17 - #2642

Merged
abhilash-sivan merged 11 commits into
mainfrom
currency-bot-major-graphql-1702
Jul 30, 2026
Merged

abhilash-sivan merged 11 commits into
mainfrom
currency-bot-major-graphql-1702

Conversation

@instanacd

@instanacd instanacd commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

@abhilash-sivan

Copy link
Copy Markdown
Contributor

@abhilash-sivan

Copy link
Copy Markdown
Contributor

@abhilash-sivan
abhilash-sivan force-pushed the currency-bot-major-graphql-1702 branch from 0b2b318 to f14c630 Compare July 29, 2026 10:59
@kirrg001

Copy link
Copy Markdown
Contributor

https://www.graphql-js.org/upgrade-guides/v16-v17/
Did you check the new features? It seems there is different public API notations etc. We might need to add some.

We can temporarily skip apollo server - the PR to support v17 is already open though.

@abhilash-sivan abhilash-sivan changed the title [Currency Bot] Bumped graphql from 16.14.2 to 17.0.2 feat: added support for graphql v17 Jul 30, 2026
@abhilash-sivan

Copy link
Copy Markdown
Contributor

Did you check the new features? It seems there is different public API notations etc. We might need to add some.

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 ?

@kirrg001

Copy link
Copy Markdown
Contributor

Could you please run ESM tests on this branch?

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 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 => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirrg001

Copy link
Copy Markdown
Contributor

We can add more in the future if there are no critical items. wdyt ?

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.

@abhilash-sivan

Copy link
Copy Markdown
Contributor

Could you please run ESM tests on this branch?

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 list anything which affects our instrumentation or is not covered? Ty

Previously also we were only shimming the execute method only.
Right now they splitted it to:

Last but certainly not least, v17 includes long-awaited experimental support for incremental delivery with @defer and @stream. GraphQL.js v17 keeps ordinary execute() as a single-result executor and exposes experimentalExecuteIncrementally() for the current incremental response shape.

so we can consider adding experimentalExecuteIncrementally if this is not already coverd with current instrumentation changes

@abhilash-sivan
abhilash-sivan force-pushed the currency-bot-major-graphql-1702 branch from fdbc929 to 6ff328f Compare July 30, 2026 09:55
@@ -0,0 +1,6 @@
{
"dependencies": {
"@apollo/server": "latest",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was that a bug? We changed the logic here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't follow this change, is this cause a change in v16 test flow?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah me neither :D

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this does not explain why. I'd remove this comment - see suggestion

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, sure. I'll apply the changes once the current pipeline passes, before merging.

@kirrg001 kirrg001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-approving 👍

@aryamohanan aryamohanan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🎉

abhilash-sivan and others added 3 commits July 30, 2026 19:13
Co-authored-by: kirrg001 <katharina.irrgang@googlemail.com>
@abhilash-sivan
abhilash-sivan force-pushed the currency-bot-major-graphql-1702 branch from d214ae5 to e03d90c Compare July 30, 2026 13:43
@sonarqubecloud

Copy link
Copy Markdown

@abhilash-sivan
abhilash-sivan merged commit 415a255 into main Jul 30, 2026
3 checks passed
@instanacd
instanacd deleted the currency-bot-major-graphql-1702 branch August 3, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants