Fmt juniper_actix
crate
This commit is contained in:
parent
a684e1d91c
commit
0f400c3799
1 changed files with 15 additions and 9 deletions
|
@ -227,19 +227,22 @@ pub async fn playground_handler(
|
||||||
pub mod subscriptions {
|
pub mod subscriptions {
|
||||||
use std::{fmt, sync::Arc};
|
use std::{fmt, sync::Arc};
|
||||||
|
|
||||||
use actix::prelude::*;
|
use actix::{prelude::*, Actor, StreamHandler};
|
||||||
use actix::{Actor, StreamHandler};
|
use actix_web::{
|
||||||
use actix_web::http::header::{HeaderName, HeaderValue};
|
http::header::{HeaderName, HeaderValue},
|
||||||
use actix_web::{web, HttpRequest, HttpResponse};
|
web, HttpRequest, HttpResponse,
|
||||||
|
};
|
||||||
use actix_web_actors::ws;
|
use actix_web_actors::ws;
|
||||||
|
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
use juniper::futures::{
|
use juniper::{
|
||||||
|
futures::{
|
||||||
stream::{SplitSink, SplitStream, StreamExt},
|
stream::{SplitSink, SplitStream, StreamExt},
|
||||||
SinkExt,
|
SinkExt,
|
||||||
|
},
|
||||||
|
GraphQLSubscriptionType, GraphQLTypeAsync, RootNode, ScalarValue,
|
||||||
};
|
};
|
||||||
use juniper::{GraphQLSubscriptionType, GraphQLTypeAsync, RootNode, ScalarValue};
|
|
||||||
use juniper_graphql_ws::{ArcSchema, ClientMessage, Connection, Init, ServerMessage};
|
use juniper_graphql_ws::{ArcSchema, ClientMessage, Connection, Init, ServerMessage};
|
||||||
|
|
||||||
/// Serves the graphql-ws protocol over a WebSocket connection.
|
/// Serves the graphql-ws protocol over a WebSocket connection.
|
||||||
|
@ -782,7 +785,10 @@ mod subscription_tests {
|
||||||
use juniper::{
|
use juniper::{
|
||||||
futures::{SinkExt, StreamExt},
|
futures::{SinkExt, StreamExt},
|
||||||
http::tests::{run_ws_test_suite, WsIntegration, WsIntegrationMessage},
|
http::tests::{run_ws_test_suite, WsIntegration, WsIntegrationMessage},
|
||||||
tests::fixtures::starwars::{model::Database, schema::Query, schema::Subscription},
|
tests::fixtures::starwars::{
|
||||||
|
model::Database,
|
||||||
|
schema::{Query, Subscription},
|
||||||
|
},
|
||||||
EmptyMutation, LocalBoxFuture,
|
EmptyMutation, LocalBoxFuture,
|
||||||
};
|
};
|
||||||
use juniper_graphql_ws::ConnectionConfig;
|
use juniper_graphql_ws::ConnectionConfig;
|
||||||
|
|
Loading…
Reference in a new issue