Closed
Description
Similar to the type inference issues that were present with the WebTestClient.BodySpec
, there are now also issues here with the GraphQlTester.EntitySpec
.
So for example, the following code will not compile;
graphQlTester
.query(query)
.execute()
.path("merchants.edges[0].node.id")
.entity(String::class.java)
.isEqualTo<String>(id)
It will instead result it the following error:
Type argument is not within its bounds.
Expected: Nothing!
Found: String!
Changing String
to Nothing
satisfies the compiler, but errors out at runtime with a KotlinNothingValueException
.
graphQlTester
.query(query)
.execute()
.path("merchants.edges[0].node.id")
.entity(String::class.java)
.isEqualTo<Nothing>(id)
The expected/preferred kotlin api would be something like:
graphQlTester
.query(query)
.execute()
.path("merchants.edges[0].node.id")
.entity<String>()
.isEqualTo(id)