Open
Description
I think this is a bug but I'm not sure... I've spent several days reading code and trying in vain to achieve this so I'd like a second opinion.
Queries can be set up like this (and so can mutations):
pub struct QueryRoot;
#[juniper::graphql_object(Context = Context)]
impl QueryRoot {
fn settings(&self) -> settings::SettingQueries {
settings::SettingQueries
}
fn other(&self) -> other::OtherQueries {
other::OtherQueries
}
}
However, no variation of this seems to be possible with Subscriptions (this doesn't compile):
pub struct SubscriptionRoot;
#[juniper::graphql_subscription(Context = Context)]
impl SubscriptionRoot {
fn settings(&self) -> settings::SettingSubscriptions {
settings::SettingSubscriptions
}
fn other(&self) -> other::OtherSubscriptions {
other::OtherSubscriptions
}
}
Shouldn't this work or is it a design decision? Are all subscriptions for the whole app required to be in one root impl?