-
When using
This however is throwing errors:
Adding the java.time package to the
Of course, I could start up the entire application, spin up docker containers for database and redis, start up wiremock for downstream services and basically end up with a slow and complicated test and I do not want to do that to test only the configuration of the graphql controller that is generated by the graphql-kotlin plugin. How to enable this test, what am I doing wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It looks like you are trying to return I would suggest not using any of the base java classes in your schema unless you are doing something with custom scalars. Avoiding these types means your API schema is better controlled and more focuses on returning the exact data the client needs rather than having the ability to access every method on |
Beta Was this translation helpful? Give feedback.
-
Hello @keetron I'm facing a similar issue as this but in a different setup using Quarkus and exception with |
Beta Was this translation helpful? Give feedback.
It looks like you are trying to return
TemporalAccessor
somewhere in the schema so it is taking all the functions in this class and running them through the generator. The methodTemporalAccessor.range
has one argument and that happens to be an interface. In Kotlin this is valid, but in GraphQL you can not use interfaces as input objects. So the resolution here is to either use a type different thanTemporalAccessor
or modify the behaviour with hooks to ignore this method.I would suggest not using any of the base java classes in your schema unless you are doing something with custom scalars. Avoiding these types means your API schema is better controlled and more focuses on returning the…