Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for subscriptions #159

Open
jcblw opened this issue Jun 26, 2021 · 2 comments
Open

Support for subscriptions #159

jcblw opened this issue Jun 26, 2021 · 2 comments
Labels
core issue or PR for the core of finch-graphql package. enhancement New feature or request

Comments

@jcblw
Copy link
Contributor

jcblw commented Jun 26, 2021

I am not quite sure how to support this yet, but it looks like there are a few main things to do.

  • Hook up port connections.
    • Allow this to be configured ( maybe )
  • Handle async iterables from the executable schema when a subscription
    • Assuming that how it works
  • Lookup port, and send the message to the port response from async iterable

We will need to update codegen to create the subscription hooks, and I assume we will want to setup the port stuff internally. I think the code in the devtools to connect a port is pretty good for this.

I would like also to have some type of support for this in the devtools. Not sure on what that can look like, but I assume it will probably a list of responses from the subscription.

@jcblw jcblw added the core issue or PR for the core of finch-graphql package. label Jun 26, 2021
@jcblw
Copy link
Contributor Author

jcblw commented Jun 26, 2021

Here is a good library we might be able to use or recommend for the creation of async iterators.

https://github.com/apollographql/graphql-subscriptions

@jcblw
Copy link
Contributor Author

jcblw commented Jun 27, 2021

Been digging here is a pretty good look at how the internals of something like this can work.

https://github.com/enisdenjo/graphql-ws/blob/master/src/server.ts#L763

@jcblw jcblw added the enhancement New feature or request label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core issue or PR for the core of finch-graphql package. enhancement New feature or request
Development

No branches or pull requests

1 participant