@Component
@DgsComponent
public class TestController {
@DgsQuery
public Integer test(@InputArgument Integer input) {
return input + 10213123;
}
}
Webflux config
@Configuration
@EnableWebFlux
public class Webflux implements WebFluxConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:8000")
.allowedHeaders("GET", "POST", "PUT", "DELETE")
.maxAge(3600);
}
}
Graphqls
type Query {
test(input: Int): Int
}
maven
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.netflix.graphql.dgs</groupId>
<artifactId>graphql-dgs-platform-dependencies</artifactId>
<!-- The DGS BOM/platform dependency. This is the only place you set version of DGS -->
<version>4.10.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>com.netflix.graphql.dgs</groupId>
<artifactId>graphql-dgs-webflux-starter</artifactId>
</dependency>
Errors
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
Correct the classpath of your application so that it contains compatible versions of the classes reactor.netty.transport.ServerTransport$DisposableBind and reactor.core.publisher.MonoSink
Don't know whether it is a bug or not
Code is very simple,
Webflux config
Graphqls
maven
Errors
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
The following method did not exist:
Action:
Correct the classpath of your application so that it contains compatible versions of the classes reactor.netty.transport.ServerTransport$DisposableBind and reactor.core.publisher.MonoSink