There is no scalar implementation for the named 'GraphQLLong' scalar type
See original GitHub issueI read the docs and did the following:
Gradle:
implementation 'com.graphql-java:graphql-java:15.0' // Also tried v16.1
implementation 'com.graphql-java:graphql-java-extended-scalars:15.0.0'
Java:
import graphql.scalars.ExtendedScalars;
...
newRuntimeWiring()
.scalar(ExtendedScalars.GraphQLLong)
.type(...).build();
GraphQL:
scalar GraphQLLong
type Mutation {
myTest(someValue:GraphQLLong): String
}
And I get the error:
SchemaProblem{errors=[There is no scalar implementation for the named 'GraphQLLong' scalar type]}
graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:74)
graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:52)
I notice if I comment out the java lines, it gives me the same error. I verified that the scalar is there via printout of the RuntimeWiring objects getScalars() method.
GraphQLScalarType{name='Long', description='Long type', coercing=graphql.scalars.java.JavaPrimitives$1@5e08b120}
What am I doing wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
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 ; public class...
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 >Adding Custom Scalars - DGS Framework
It is easy to add a custom scalar type in the DGS framework: Create a class that implements the graphql.schema.Coercing interface and annotate...
Read more >[solved]-graphql java spring boot -- scalar type error
Coding example for the question Graphql java spring boot -- Scalar type error -- There is no scalar implementation for the named 'XXX'...
Read more >GraphQL Server Using Spring Boot, Part II — Scalars - Medium
Thus, it is impossible to write a GraphQL operation without scalars being involved. Note: there is no void in GraphQL.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
so if you have:
and:
you still see the problem?
@UglyHobbitFeet I would close this bug as there is no bug to fix here 😃