Skip to content

Commit

Permalink
graph, graphql: Remove Resolver.resolve_field_stream and UnitStream
Browse files Browse the repository at this point in the history
  • Loading branch information
lutter committed Feb 18, 2025
1 parent d520d88 commit 9c69088
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 0 additions & 2 deletions graph/src/components/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,6 @@ pub struct StoreEventStream<S> {
pub type StoreEventStreamBox =
StoreEventStream<Box<dyn Stream<Item = Arc<StoreEvent>, Error = ()> + Send>>;

pub type UnitStream = Box<dyn futures03::Stream<Item = ()> + Unpin + Send + Sync>;

impl<S> Stream for StoreEventStream<S>
where
S: Stream<Item = Arc<StoreEvent>, Error = ()> + Send,
Expand Down
14 changes: 1 addition & 13 deletions graphql/src/execution/resolver.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;

use graph::components::store::{QueryPermit, UnitStream};
use graph::components::store::QueryPermit;
use graph::data::query::{CacheStatus, Trace};
use graph::prelude::{async_trait, s, Error, QueryExecutionError};
use graph::schema::ApiSchema;
Expand Down Expand Up @@ -111,18 +111,6 @@ pub trait Resolver: Sized + Send + Sync + 'static {
}
}

// Resolves a change stream for a given field.
fn resolve_field_stream(
&self,
_schema: &ApiSchema,
_object_type: &s::ObjectType,
_field: &a::Field,
) -> Result<UnitStream, QueryExecutionError> {
Err(QueryExecutionError::NotSupported(String::from(
"Resolving field streams is not supported by this resolver",
)))
}

fn post_process(&self, _result: &mut QueryResult) -> Result<(), Error> {
Ok(())
}
Expand Down

0 comments on commit 9c69088

Please # to comment.