Skip to content

Conversation

@stuebingerb
Copy link
Owner

Enhances existing error messages by:

  • adding more details for some errors:
    Old: "Required arguments cannot be marked as deprecated"
    New: "Required argument 'oldRequired' cannot be marked as deprecated"
    
    Old: "Invalid input values on data: [intss]"
    New: "Invalid input values: [intss], available: [int, string]"
    
  • aligning wording of similar errors to reduce potential for confusion
  • encapsulating dynamic values in single quotes ' to improve clarity:
    Old: "Property __typename on String does not exist"
    New: "Property '__typename' on 'String' does not exist"
    
  • wrapping errors to prefix their current entry point:
    Old: "Context type cannot be part of schema"
    New: "Unable to handle 'query("name")': Context type cannot be part of schema"
    

Resolves #434

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 84.48276% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.77%. Comparing base (004f1c8) to head (55a7312).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ched/schema/structure/StitchedSchemaCompilation.kt 81.57% 2 Missing and 5 partials ⚠️
...ase/kgraphql/schema/structure/SchemaCompilation.kt 86.95% 3 Missing and 3 partials ⚠️
...com/apurebase/kgraphql/schema/dsl/SchemaBuilder.kt 60.00% 1 Missing and 1 partial ⚠️
...se/kgraphql/schema/structure/RequestInterpreter.kt 77.77% 0 Missing and 2 partials ⚠️
...e/kgraphql/schema/execution/ArgumentTransformer.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #445      +/-   ##
==========================================
+ Coverage   82.20%   82.77%   +0.57%     
==========================================
  Files         152      152              
  Lines        4776     4789      +13     
  Branches      849      849              
==========================================
+ Hits         3926     3964      +38     
+ Misses        533      517      -16     
+ Partials      317      308       -9     

☔ 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.

@stuebingerb stuebingerb force-pushed the feature/better-error-handling-during-schema-compilation branch from 810f1d1 to 760a5d4 Compare November 5, 2025 10:58
Enhances existing error messages by:

- adding more details for some errors:
  ```
  Old: "Required arguments cannot be marked as deprecated"
  New: "Required argument 'oldRequired' cannot be marked as deprecated"
  ```
  ```
  Old: "Invalid input values on data: [intss]"
  New: "Invalid input values: [intss], available: [int, string]"
  ```
- aligning wording of similar errors to reduce potential for confusion
- encapsulating dynamic values in single quotes `'` to improve clarity:
  ```
  Old: "Property __typename on String does not exist"
  New: "Property '__typename' on 'String' does not exist"
  ```
- wrapping errors to prefix their current entry point:
  ```
  Old: "Context type cannot be part of schema"
  New: "Unable to handle 'query("name")': Context type cannot be part of schema"
  ```

Resolves #434
@stuebingerb stuebingerb force-pushed the feature/better-error-handling-during-schema-compilation branch from 760a5d4 to 55a7312 Compare November 5, 2025 11:59
@stuebingerb stuebingerb merged commit 30dbbb9 into main Nov 7, 2025
10 of 11 checks passed
@stuebingerb stuebingerb deleted the feature/better-error-handling-during-schema-compilation branch November 7, 2025 09:37
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.

SchemaException doesn't provide enough information for fixing

2 participants