Unable to match type definition for scalar type Long, after upgrading to 14.0.0 #863
-
Hi In my project, I was using the graphql-spring-boot-starter v5.8.1, and am trying to upgrade to the latest version 14.0.0. As per the documentation, the project is now using the BOM structure. So I have removed the other dependencies related to graphql-spring-boot-starter When I try to start the server, I get the following error:-
Dependency is as follows:-
Here the spring-graphql-starter.version is pointing to 14.0.0. There is no external configuration setup, which means it should be taking the default configuration. I'm unsure as to why this is not working. The kotlin version is 1.7.10. Please let me know if I have missed something? Let me know if any information is required. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
These non default scalars have been removed from core <dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-scalars</artifactId>
<version>18.1</version>
</dependency> Add the scalar definition to your GraphQL schema file: scalar Long And expose the Long scalar provided by the import static graphql.scalars.ExtendedScalars.GraphQLLong;
import graphql.schema.GraphQLScalarType;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
class GraphQLScalarConfiguration {
@Bean
GraphQLScalarType longScalar() {
return GraphQLLong;
}
} |
Beta Was this translation helpful? Give feedback.
These non default scalars have been removed from core
graphql-java
library in one of the intermediate versions and have been moved to thegraphql-java-extended-scalars
package. To use it you have to add that dependency:Add the scalar definition to your GraphQL schema file:
And expose the Long scalar provided by the
graphql-java-extended-scalars
library as a Spring Bean in one of your configuration classes: