You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to make a GraphQL API for a project, I've come to encounter what appears to be a regression as of Quarkus 3.0.0.Final.
Using a parameterized record as an argument within a query method makes my query fail, no matter what I try or do. However, this problem is not reproducable in Quarkus versions 2.x.x, as far as I could find.
Versions I have tried so far:
2.10.2.Final - Works as intended
2.16.7.Final - Works as intended
3.0.1.Final - Does not work as intended
3.0.2.Final - Does not work as intended
Expected behavior
Be able to query with a parameterized record within my query and get back expected results
Actual behavior
Query fails with error ValidationError and message argument 'argument' with value 'StringValue{value='{\n \"variable\": \"test\"\n}'}' is not a valid 'Unknown Scalar Type [org.rrrakyah.ExampleRecord]'
How to Reproduce?
Steps to reproduce:
Create new Quarkus project with extension quarkus-smallrye-graphql
Add parameterized record, with a variable of type parameter, e.g.:
package org.rrrakyah;
public record ExampleRecord<T>(T variable) {
}
Create query with an argument of type parameterized record, e.g.:
package org.rrrakyah;
import org.eclipse.microprofile.graphql.Description;
import org.eclipse.microprofile.graphql.GraphQLApi;
import org.eclipse.microprofile.graphql.Query;
@GraphQLApi
public class HelloGraphQLResource {
@Query
@Description("Say hello")
public String sayHello(ExampleRecord<String> argument) {
return "Hello " + argument.variable();
}
}
This looks very similar to smallrye/smallrye-graphql#1819 where we assume it is caused by a bug in Yasson: eclipse-ee4j/yasson#599, we're waiting for Yasson maintainers to check it. There was an upgrade from Yasson 1 to 3 between Quarkus 2.16 and 3/.0.
Describe the bug
While trying to make a GraphQL API for a project, I've come to encounter what appears to be a regression as of Quarkus 3.0.0.Final.
Using a parameterized record as an argument within a query method makes my query fail, no matter what I try or do. However, this problem is not reproducable in Quarkus versions 2.x.x, as far as I could find.
Versions I have tried so far:
Expected behavior
Be able to query with a parameterized record within my query and get back expected results
Actual behavior
Query fails with error
ValidationError
and messageargument 'argument' with value 'StringValue{value='{\n \"variable\": \"test\"\n}'}' is not a valid 'Unknown Scalar Type [org.rrrakyah.ExampleRecord]'
How to Reproduce?
Steps to reproduce:
quarkus-smallrye-graphql
ValidationError
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "17.0.4.1" 2022-08-12 LTS
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.0.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Additional information
No response
The text was updated successfully, but these errors were encountered: