Fix websocket connection in warp subscriptions example (#583)

This commit is contained in:
imspace 2020-03-25 08:20:34 +08:00 committed by GitHub
parent cab6decdbc
commit 3b465cbf04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,10 @@ async fn main() {
})
},
))
.map(|reply| {
// TODO#584: remove this workaround
warp::reply::with_header(reply, "Sec-WebSocket-Protocol", "graphql-ws")
})
.or(warp::post()
.and(warp::path("graphql"))
.and(qm_graphql_filter))