Open
Description
Describe the bug
DGS uses the valueToLiteral method on Cooercing. This has NOT been implements by the LocalTimeCooercinf class so we get an Unsupported Operation Exception. This scalar is also not in line with the other scalars that inline their coercing class.
java.lang.UnsupportedOperationException: The non deprecated version of valueToLiteral has not been implemented by this scalar : class graphql.scalars.datetime.LocalTimeCoercing
at graphql.schema.Coercing.valueToLiteral(Coercing.java:222)
at graphql.schema.Coercing.valueToLiteral(Coercing.java:240)
at com.netflix.graphql.dgs.client.codegen.InputValueSerializer.getOptionalValue(InputValueSerializer.kt:98)
at com.netflix.graphql.dgs.client.codegen.InputValueSerializer.toValue(InputValueSerializer.kt:70)
at com.netflix.graphql.dgs.client.codegen.InputValueSerializer.toValue$lambda$1(InputValueSerializer.kt:83)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:816)
at com.netflix.graphql.dgs.client.codegen.InputValueSerializer.toValue(InputValueSerializer.kt:84)
at com.netflix.graphql.dgs.client.codegen.GraphQLQueryRequest.serialize(GraphQLQueryRequest.kt:92)
at com.netflix.graphql.dgs.client.codegen.GraphQLQueryRequest.serialize(GraphQLQueryRequest.kt:75)
at uk.gov.hmpo.crpf.csor.birthapi.graphql.GraphQLClientHelper.getRequest(GraphQLClientHelper.java:85)
at uk.gov.hmpo.crpf.csor.birthapi.graphql.BirthCreationHelper.createSingleBirth(BirthCreationHelper.java:30)
To Reproduce
The following code implements this fix and adds a test for this scalar.
Make_LocalTime_scalar_the_same_as_other_scalars___Also_fixed_issue_where_valueToLiteral_wa1.patch
Activity
This removes all the deprecated Coercing methods and replaces them wi…
bbakerman commentedon Jun 15, 2025
I have addressed this in the linked PR and also took some of the tests from your patch to help with that.
The PR ended up being much more than just this issue - its all deprecated coercing methods removed and tests updated but yours is in there
Thanks