Skip to content

A few questions about Subscriptions #997

@acavestro

Description

@acavestro

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions