@Configuration
@EnableWebSocket
@ConditionalOnWebApplication(type=SERVLET)
@ConditionalOnClass(value=org.springframework.web.socket.config.annotation.WebSocketConfigurer.class)
@ConditionalOnProperty(name="graphql.spqr.ws.enabled",
havingValue="true",
matchIfMissing=true)
@ConditionalOnBean(value=graphql.schema.GraphQLSchema.class)
public class WebSocketAutoConfiguration
extends Object
implements org.springframework.web.socket.config.annotation.WebSocketConfigurer
| Constructor and Description |
|---|
WebSocketAutoConfiguration(graphql.GraphQL graphQL,
SpqrProperties config,
Optional<DataLoaderRegistryFactory> dataLoaderRegistryFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
registerWebSocketHandlers(org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry webSocketHandlerRegistry) |
WebSocketContextFactory |
webSocketContextFactory() |
GraphQLWebSocketExecutor |
webSocketExecutor(WebSocketContextFactory contextFactory) |
PerConnectionApolloHandler |
webSocketHandler(GraphQLWebSocketExecutor executor) |
@Autowired
public WebSocketAutoConfiguration(graphql.GraphQL graphQL,
SpqrProperties config,
Optional<DataLoaderRegistryFactory> dataLoaderRegistryFactory)
public void registerWebSocketHandlers(org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry webSocketHandlerRegistry)
registerWebSocketHandlers in interface org.springframework.web.socket.config.annotation.WebSocketConfigurer@Bean @ConditionalOnMissingBean public WebSocketContextFactory webSocketContextFactory()
@Bean @ConditionalOnMissingBean public GraphQLWebSocketExecutor webSocketExecutor(WebSocketContextFactory contextFactory)
@Bean @ConditionalOnMissingBean public PerConnectionApolloHandler webSocketHandler(GraphQLWebSocketExecutor executor)
Copyright © 2018–2021. All rights reserved.