Skip to content

refactor!: rework GraphQLError#560

Merged
stuebingerb merged 1 commit intomainfrom
refactor/rework-graphql-error
Mar 11, 2026
Merged

refactor!: rework GraphQLError#560
stuebingerb merged 1 commit intomainfrom
refactor/rework-graphql-error

Conversation

@stuebingerb
Copy link
Copy Markdown
Owner

Introduce RequestError and ExecutionError as separate base classes for errors, and make GraphQLError a sealed class to prevent other subclasses.

Refactor the list of ASTNodes to a single node to be able to include a proper path in the response.

BREAKING CHANGE: GraphQLError can no longer be instantiated or subclassed; users will have to decide for either RequestError or ExecutionError.

BREAKING CHANGE: GraphQLError no longer has a list of ASTNodes but only a single one.

BREAKING CHANGE: ExecutionException no longer accepts an ASTNode but only an Execution.

BREAKING CHANGE: ExecutionException now requires a node.

BREAKING CHANGE: path and locations keys may now be missing from the error response if no values can be provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.94%. Comparing base (a56f81d) to head (749904e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...main/kotlin/com/apurebase/kgraphql/GraphQLError.kt 96.49% 1 Missing and 1 partial ⚠️
...base/kgraphql/stitched/RemoteExecutionException.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
+ Coverage   83.79%   83.94%   +0.15%     
==========================================
  Files         152      152              
  Lines        4936     4952      +16     
  Branches      863      855       -8     
==========================================
+ Hits         4136     4157      +21     
+ Misses        497      495       -2     
+ Partials      303      300       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

🐰 Bencher Report

Branchrefactor/rework-graphql-error
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s)
(Result Δ%)
Lower Boundary
operations / second (ops/s)
(Limit %)
com.apurebase.kgraphql.FunctionExecutionBenchmark.benchmarkFunctionExecution📈 view plot
🚷 view threshold
6,092,663.84 ops/s
(+2.46%)Baseline: 5,946,529.25 ops/s
5,448,469.13 ops/s
(89.43%)
com.apurebase.kgraphql.ParallelExecutionBenchmark.queryBenchmark📈 view plot
🚷 view threshold
1.30 ops/s
(-0.03%)Baseline: 1.30 ops/s
1.30 ops/s
(99.82%)
com.apurebase.kgraphql.QueryBenchmark.executionError📈 view plot
🚷 view threshold
15,076.69 ops/s
com.apurebase.kgraphql.QueryBenchmark.largeList📈 view plot
🚷 view threshold
4.79 ops/s
(+9.16%)Baseline: 4.38 ops/s
2.44 ops/s
(51.02%)
com.apurebase.kgraphql.QueryBenchmark.largeListWithFragment📈 view plot
🚷 view threshold
4.99 ops/s
com.apurebase.kgraphql.QueryBenchmark.manyChildren📈 view plot
🚷 view threshold
189.72 ops/s
(-1.30%)Baseline: 192.21 ops/s
171.04 ops/s
(90.16%)
com.apurebase.kgraphql.QueryBenchmark.manyDataChildren📈 view plot
🚷 view threshold
8.91 ops/s
(-0.46%)Baseline: 8.95 ops/s
8.86 ops/s
(99.48%)
com.apurebase.kgraphql.QueryBenchmark.manyOperations📈 view plot
🚷 view threshold
285.16 ops/s
(-1.28%)Baseline: 288.86 ops/s
244.23 ops/s
(85.65%)
com.apurebase.kgraphql.QueryBenchmark.manyOperationsWithFragment📈 view plot
🚷 view threshold
290.87 ops/s
com.apurebase.kgraphql.QueryBenchmark.nestedObject📈 view plot
🚷 view threshold
6,970.95 ops/s
(-10.87%)Baseline: 7,820.76 ops/s
6,604.86 ops/s
(94.75%)
com.apurebase.kgraphql.RequestCachingBenchmark.invalidRequest📈 view plot
🚷 view threshold
215,987.16 ops/s
(-4.87%)Baseline: 227,038.29 ops/s
208,986.42 ops/s
(96.76%)
com.apurebase.kgraphql.RequestCachingBenchmark.largeRequest📈 view plot
🚷 view threshold
7,102.27 ops/s
(-11.92%)Baseline: 8,063.09 ops/s
6,947.76 ops/s
(97.82%)
com.apurebase.kgraphql.RequestCachingBenchmark.smallRequest📈 view plot
🚷 view threshold
10,291.08 ops/s
(-13.38%)Baseline: 11,881.37 ops/s
9,833.37 ops/s
(95.55%)
com.apurebase.kgraphql.SimpleExecutionOverheadBenchmark.benchmark📈 view plot
🚷 view threshold
458,835.73 ops/s
(-2.63%)Baseline: 471,213.58 ops/s
455,187.36 ops/s
(99.20%)
🐰 View full continuous benchmarking report in Bencher

Introduce `RequestError` and `ExecutionError` as separate base classes
for errors, and make `GraphQLError` a `sealed class` to prevent other
subclasses.

Refactor the list of `ASTNode`s to a single node to be able to include
a proper `path` in the response.

BREAKING CHANGE: `GraphQLError` can no longer be instantiated or
subclassed; users will have to decide for either `RequestError` or
`ExecutionError`.

BREAKING CHANGE: `GraphQLError` no longer has a list of `ASTNode`s but
only a single one.

BREAKING CHANGE: `ExecutionException` no longer accepts an `ASTNode`
but only an `Execution`.

BREAKING CHANGE: `ExecutionException` now requires a node.

BREAKING CHANGE: `path` and `locations` keys may now be missing from
the error response if no values can be provided.
@stuebingerb stuebingerb force-pushed the refactor/rework-graphql-error branch from ec96a05 to 749904e Compare March 8, 2026 17:13
@stuebingerb stuebingerb merged commit db0eced into main Mar 11, 2026
11 checks passed
@stuebingerb stuebingerb deleted the refactor/rework-graphql-error branch March 11, 2026 07:51
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.

1 participant