Update schema.rs
This commit is contained in:
parent
f04a2291f9
commit
273aecb6bf
|
@ -11,6 +11,7 @@ use crate::{
|
||||||
Environment, Error, ObjectType, Pos, QueryError, QueryResponse, Result, SubscriptionStream,
|
Environment, Error, ObjectType, Pos, QueryError, QueryResponse, Result, SubscriptionStream,
|
||||||
SubscriptionType, Type, Variables,
|
SubscriptionType, Type, Variables,
|
||||||
};
|
};
|
||||||
|
use async_graphql_parser::query::OperationType;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use futures::channel::mpsc;
|
use futures::channel::mpsc;
|
||||||
use futures::Stream;
|
use futures::Stream;
|
||||||
|
@ -255,6 +256,10 @@ where
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if document.current_operation().ty != OperationType::Subscription {
|
||||||
|
return Err(QueryError::NotSupported.into_error(Pos::default()));
|
||||||
|
}
|
||||||
|
|
||||||
let resolve_id = AtomicUsize::default();
|
let resolve_id = AtomicUsize::default();
|
||||||
let environment = Arc::new(Environment {
|
let environment = Arc::new(Environment {
|
||||||
variables,
|
variables,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user