Hello everyone,
I'm sorry to bother about some maybe trivial questions, but I'm quite new to Rust and Juniper and I'm working to a spike project about GraphQL subscription. There is a couple of things I can't understand and I would like to ask.
I'm working with juniper-actix, juniper-subscriptions and juniper-graphql-ws crates.
First question. A subscription resolver should return a Stream object. Do the libraries keep polling on it or do they poll on the entire resolver method, expecting a new Stream every time?
Second question. Does every subscription correspond to a thread (or a tokio task) or is there something like a thread pool to manage websockets and subscriptions? Maybe something like a coordinator?
Thanks in advance to who will be patient enough to answer :D
Have a great day
Antonio
Hello everyone,
I'm sorry to bother about some maybe trivial questions, but I'm quite new to Rust and Juniper and I'm working to a spike project about GraphQL subscription. There is a couple of things I can't understand and I would like to ask.
I'm working with
juniper-actix,juniper-subscriptionsandjuniper-graphql-wscrates.First question. A subscription resolver should return a
Streamobject. Do the libraries keep polling on it or do they poll on the entire resolver method, expecting a newStreamevery time?Second question. Does every subscription correspond to a thread (or a tokio task) or is there something like a thread pool to manage websockets and subscriptions? Maybe something like a coordinator?
Thanks in advance to who will be patient enough to answer :D
Have a great day
Antonio