Skip to content

Add onError request parameter#4378

Draft
martinbonnin wants to merge 3 commits into
graphql-java:masterfrom
martinbonnin:on-error
Draft

Add onError request parameter#4378
martinbonnin wants to merge 3 commits into
graphql-java:masterfrom
martinbonnin:on-error

Conversation

@martinbonnin

Copy link
Copy Markdown
Contributor

I'm opening this as a heads up: see graphql/graphql-spec#1163

Not sure we want to merge is now since it's not in graphql-js yet and the @experimental_disableErrorPropagation directive still gets the job done for now. But looks like this is the direction we're taking.

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5885 (+4 🟢) 5829 (+4 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5885 (+4 🟢) 5828 (+4 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5885 (+4 🟢) 5828 (+4 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5885 (+4 🟢) 5828 (+4 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23572 (+16 🟢) 23345 (+16 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 29698 3129 90.5% ±0.0%
Branches 8736 1532 85.1% ±0.0%
Methods 7928 1209 86.8% ±0.0%

Changed Class Coverage (2 classes)

Class Line Branch Method
g.e.Execution +0.3% 🟢 +3.5% 🟢 ±0.0%
g.e.OnError +100.0% 🟢 ±0.0% +100.0% 🟢

Full HTML report: build artifact jacoco-html-report

Updated: 2026-06-01 10:00:46 UTC

@bbakerman

Copy link
Copy Markdown
Member

One possible approach might be to "maintain" the old directive WHILE adding the new ExecutionInput based approach.

That way anyone who has used the old will be able to migrate to the new without breaking. This will cost time and complexity of course but it will be "less impactful" to current users

That said - at what point is the kill date? One could argue it was "experimental" and hence the kill date is immediate as this PR has done

@martinbonnin

martinbonnin commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@bbakerman agreed, I'll split this PR in 2 so we can have both at the same time.

Edit: added back @experimental_disableErrorPropagation in e91ba02, will do the PR to remove @experimental_disableErrorPropagation when needed

@martinbonnin martinbonnin changed the title Replace @experimental_disableErrorPropagation with onError parameter Add onError request parameter Jun 1, 2026
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.

2 participants