graphql-spring-boot icon indicating copy to clipboard operation
graphql-spring-boot copied to clipboard

no scalar implementation for the named 'XXX' scalar type

Open ANUGLYPLUGIN opened this issue 2 years ago • 4 comments

  • dependencies
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-spring-boot-starter</artifactId>
            <version>12.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-java-tools</artifactId>
            <version>12.0.0</version>
        </dependency>
  • Schema
scalar Long

type Mutation {

}
  • yml config
graphql:
  servlet:
    enabled: true
    cors-enabled: true
    exception-handlers-enabled: true
  playground:
    enabled: false
  voyager:
    enabled: true
  extended-scalars: BigDecimal, Date, Long
  • errors
Caused by: SchemaProblem{errors=[There is no scalar implementation for the named  'Long' scalar type]}
	at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:82)
	at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:58)
	at org.springframework.graphql.execution.DefaultSchemaResourceGraphQlSourceBuilder.initGraphQlSchema(DefaultSchemaResourceGraphQlSourceBuilder.java:112)
	at org.springframework.graphql.execution.AbstractGraphQlSourceBuilder.build(AbstractGraphQlSourceBuilder.java:85)
	at org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration.graphQlSource(GraphQlAutoConfiguration.java:91)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)

ANUGLYPLUGIN avatar May 24 '22 06:05 ANUGLYPLUGIN