Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

no scalar implementation for the named 'Date' scalar type #573

Answered by oliemansm
mmriyadh asked this question in Q&A
Discussion options

You must be logged in to vote

You seem to be registering the "wrong" bean. The stack trace is clearly complaining about it not being able to find the scalar type. That's because you need to expose that scalar class as a bean. See also this answer.

I don't know what that codegen tool generated for you, since I don't have any experience with it. My guess is it generated something like the DateCoercing as used below. Not sure how it would do that tbh, since those classes require certain logic that I can't imagine a tool generating for you.

  @Bean
  public GraphQLScalarType dateScalar() {
    return GraphQLScalarType.newScalar()
        .name("Date")
        .description("Date type")
        .coercing(new DateCoercing())…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mmriyadh
Comment options

@oliemansm
Comment options

Answer selected by oliemansm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants