Search code examples
graphqlgraphql-javagraphql-subscriptions

Spring boot graphql-java and subscriptions


The following example https://github.com/graphql-java/graphql-java-subscription-example which use's graphql-java for subscriptions over a websocket.

How can the same idea be done within the spring version? GraphQLSubscriptionResolver needs to return a publisher but I am unable to work out how this can then be used with a web socket.

The example above seems fine within a none spring version.


Solution

  • A good friend of mine has made an example in his github repository. The code is not the nicest (because it was for our own personal needs) but it is a nice example

    Have fun