Hey, I’m trying to define a scalar for this data...
# graphql-kotlin
j
Hey, I’m trying to define a scalar for this data type
java.time.LocalDateTime
using a custom generator hook as one of my return types includes date fields, however for some reason the type seems not to be generated even after registering the hooks. I’m using version 6.2.2
Copy code
Caused by: com.expediagroup.graphql.generator.exceptions.TypeNotSupportedException: Cannot convert java.time.LocalDateTime since it is not a valid GraphQL type or outside the supported packages "[com.twiga.inbox]"
Any ideas on where i’m going wrong?
s
The hooks look ok. You have your custom hooks class but are you also using those in the generator? Separately you could import https://github.com/graphql-java/graphql-java-extended-scalars to get the scalar definitions without having to write your own parsing/coercing logic.