Skip to content

Commit

Permalink
♻️ Kan ha LocalDateTime som parameter i mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
chsko committed Jun 4, 2024
1 parent b8f5d7a commit 9a02d8b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ private object LocalDateTimeCoercing : Coercing<LocalDateTime, String> {
dataFetcherResult: Any,
graphQLContext: GraphQLContext,
locale: Locale,
) = dataFetcherResult.toString()
): String =
when (dataFetcherResult) {
is StringValue -> dataFetcherResult.value
else -> dataFetcherResult.toString()
}

override fun parseValue(
input: Any,
Expand Down

0 comments on commit 9a02d8b

Please sign in to comment.