I think some of the changed in lacinia 1.2 broke subscriptions. I have part of the fix in lacinia-pedestal, but I may need to change lacinia to make it fully work and work properly. This has me bummed.
Essentially, for subscriptions, lacinia-pedestal invokes the streamer for the subscription field (e.g., Subscription/ticks in the https://github.com/walmartlabs/lacinia-pedestal/blob/master/dev-resources/demo-schema.edn, passing it a source-stream callback function. The thread started by the streamer function passes a value to the callback, which becomes the resolved-value when executing the query. That's a problem, because the query selection is for the subscription field (Subscription/ticks) but the value is a tick object. So the selection is right, but the value is wrong; it has to be wrapped with the fields name (:ticks in this case) so that when the query executes, there's a non-null value to perform sub-selections on (the :count and :time_ms fields from the selection).
That works for the success case, but if the callback is passed a wrapped value (such as via with-error) then things are not working correctly; the errors are ignored and lacina then performs the sub-selections on a nil value, triggering validation errors about non-null fields.
So the layers of indirection are making me dizzy, but I'm sure there's a solution here, somewhere.
Current state is https://github.com/walmartlabs/lacinia-pedestal/tree/hls/132-fix-graphiql-headers. So far, the main change is https://github.com/walmartlabs/lacinia-pedestal/blob/21df864439db198aae565be0b2472145d9660305/src/com/walmartlabs/lacinia/pedestal/subscriptions.clj#L385 where the stream value is wrapped in a map, but again, that's not sufficient when there's an error.
It's possible I can detect if it's a wrapped value and re-wrap it if so.
But I want it to be clean, to support subscription implementations for other HTTP implementations besides Pedestal.
And clean may not be possible with out a change to lacinia.