Ранее я использовал зависимость Graphql-kickstart, но заменил ее встроенной зависимостью Spring Boot GraphQL.
Есть кое-что, с чем мне удалось сделать graphql-kickstart, что я не могу сделать с новой зависимостью.
Ранее у меня была следующая настройка:
file.graphqls
Код: Выделить всё
myFunction(dateField: String): OutputDTO
Код: Выделить всё
public OutputDTO myFunction(Date dateField) { ... }
Код: Выделить всё
@QueryMapping
public OutputDTO myFunction(@Argument Date dateField) { ... }
Код: Выделить всё
ERROR 98421 --- [nio-8082-exec-2] s.g.e.ExceptionResolversExceptionHandler : Unresolved BindException for executionId d1ee4d2c-8c2c-3f75-0833-f925fea8e154
org.springframework.validation.BindException: org.springframework.graphql.data.GraphQlArgumentBinder$ArgumentsBindingResult: 1 errors
Field error in object 'date' on field '$': rejected value [2025-04-16T09:37:58Z]; codes [typeMismatch.date,typeMismatch]; arguments []; default message [Failed to convert argument value]
at org.springframework.graphql.data.GraphQlArgumentBinder.bind(GraphQlArgumentBinder.java:151)
...
Подробнее здесь: https://stackoverflow.com/questions/797 ... g-boot-3-5
Мобильная версия