Skip to content

How to correctly enable native subscription support for Kotlin Flow in graphql-kotlin-spring-server? #970

Answered by dariuszkuc
antonywhatever asked this question in Q&A
Discussion options

You must be logged in to vote

Hello 👋
Thanks for raising this. It appears that while graphql-kotlin-schema-generator exposes FlowSubscriptionExecutionStrategy we forgot to update graphql-kotlin-spring-server to easily use it.

Currently you will have to recreate the GraphQL bean (https://github.com/ExpediaGroup/graphql-kotlin/blob/master/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/spring/GraphQLSchemaConfiguration.kt#L61-L94) and configure it with the flow strategy.

I'll open up a PR to update the default to FlowSubscriptionExecutionStrategy.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@antonywhatever
Comment options

@dariuszkuc
Comment options

Answer selected by antonywhatever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants