Skip to content

Commit

Permalink
Clarify error message (#670)
Browse files Browse the repository at this point in the history
* Clarify error message

* Fix build
  • Loading branch information
gnawf authored Feb 11, 2025
1 parent 6ddeee8 commit da8ac0d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: build test and publish
run: ./gradlew assemble && ./gradlew check --info && ./gradlew artifactoryPublish -x check --info
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: my-artifact
path: lib/build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: build and test
run: ./gradlew assemble --info && ./gradlew check --info
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,11 @@ sealed interface NadelSchemaValidationError : NadelSchemaValidationResult {
val service: Service get() = parentType.service

override val message = run {
val s = service.name
val of = makeFieldCoordinates(parentType.overall.name, overallField.name)
val ofa = makeFieldCoordinates(parentType.overall.name, overallInputArg.name)
val ufa = makeFieldCoordinates(parentType.underlying.name, underlyingInputArg.name)
val ot = GraphQLTypeUtil.simplePrint(overallInputArg.type)
val ut = GraphQLTypeUtil.simplePrint(underlyingInputArg.type)
"Overall field $of has argument $ofa has input type $ot but underlying field argument $ufa in service $s has input type $ut"
val field = makeFieldCoordinates(parentType.overall.name, overallField.name)
val argName = overallInputArg.name
val overallArgType = GraphQLTypeUtil.simplePrint(overallInputArg.type)
val underlyingArgType = GraphQLTypeUtil.simplePrint(underlyingInputArg.type)
"Argument $argName in $field has type $overallArgType that is incompatible with underlying argument type $underlyingArgType"
}

override val subject = overallInputArg
Expand Down

0 comments on commit da8ac0d

Please sign in to comment.