question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There is no scalar implementation for the named 'LocalDateTime' scalar type

See original GitHub issue

Hello. Thank you very much for making this library publicly available. I’m trying to use LocalDateTime for a project and I’m getting a message saying there’s no scalar named LocalDateTime scalar type, as below:

Caused by: graphql.schema.idl.errors.SchemaProblem: errors=[There is no scalar implementation for the named  'LocalDateTime' scalar type]
	at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:80) ~[graphql-java-17.3.jar:na]
	at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:56) ~[graphql-java-17.3.jar:na]
	at org.springframework.graphql.execution.DefaultGraphQlSourceBuilder.build(DefaultGraphQlSourceBuilder.java:142) ~[spring-graphql-1.0.0-M5.jar:na]
	at org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration.graphQlSource(GraphQlAutoConfiguration.java:88) ~[spring-boot-autoconfigure-2.7.0-M1.jar:2.7.0-M1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_202]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_202]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_202]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.15.jar:5.3.15]
	... 108 common frames omitted

What I’ve done

Step 1

Added the Maven dependency.

<dependency>
	<groupId>com.zhokhov.graphql</groupId>
	<artifactId>graphql-datetime-spring-boot-starter-webflux</artifactId>
	<version>4.1.0</version>
</dependency>

Step 2

Added scalar LocalDateTime to my .graphqls schema file.

Question

Is there anything I’m missing? I looked through the README and the WebFlux sample project, but couldn’t figure it out. If further data is needed, the pet project I’m working on is publicly available here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
donbeavecommented, May 25, 2022

@setchy I’m thinking to publish it with the release of the GraphQL Java Kickstart Spring Boot 13.0.0 version. But I’m not sure when that version will be released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

There is no scalar implementation for the named ... - GitHub
I verified that the scalar is there via printout of the RuntimeWiring objects getScalars() method. GraphQLScalarType{name='Long', description=' ...
Read more >
Graphql java spring boot -- Scalar type error - Stack Overflow
Graphql java spring boot -- Scalar type error -- There is no scalar implementation for the named 'XXX' scalar type. Save this question....
Read more >
Adding Custom Scalars - DGS Framework
It is easy to add a custom scalar type in the DGS framework: Create a class that implements ... For example, this is...
Read more >
Scalars | GraphQL Java
A scalar type is meant to represent an indivisible value. The GraphQL specification states that all implementations must have the following scalar types:...
Read more >
GraphQL Server Using Spring Boot, Part II — Scalars - Medium
The appropriate Java type for that field is LocalDate . However, there is no such predefined scalar. What can we do?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found