-
-
Notifications
You must be signed in to change notification settings - Fork 119
Are subscriptions supported? #76
Comments
Hey there @KieranLafferty! It's currently not supported. Frankly, I've never used subscriptions in GraphQL yet. But I assume it's possible to stream typed data after transformations from the server (that'd be equal of what I'm currently doing on queries/mutations). I won't promise I'll look at it soon (I'm working on a refactor of the generator/another middlewares branch), but if you feel energetic about it, I can assist you in that! |
First of all thanks for this amazing lib, it is making things mush more fun to work with. I have been using this package in a new project and I am using subscriptions,
@override
final DocumentNode document = DocumentNode(definitions: [
OperationDefinitionNode(
- type: OperationType.query,
+ type: OperationType.subscription,
name: NameNode(value: 'users'), |
@agent3bood sorry man, I lost your comment. I think it should be easy to implement the generator for subscriptions, with probably just some tweaks. I'll see if I can take a look at it soon. |
@comigor thanks for the response, the generator is easy fix, but this library has a client also. |
@agent3bood Not at the moment, but I'm fairly sure gql's Link support Streams, and it could be adapted to Artemis! |
FYI, here's a tracking issue for WebSocket Link implementation in The initial plan is to borrow it from Contributions are welcome. More gql Links mean more power to Artemis. 💪 |
FYI, an alpha version of a Websocket Link has been published. https://pub.dev/packages/gql_websocket_link Feel free to try it out and report any issues at https://github.com/gql-dart/gql/issues. |
Is there a way to generate code for Subscriptions yet? If not what is the recommended way to use subscriptions with above Websocket Link or graphql client? |
I'll work on that, do you happen to know any public GraphQL server with subscriptions? |
@KieranLafferty @gouravd @agent3bood |
I'm going to keep this issue open for a while to hear your suggestions! |
Thanks @comigor looks great! Going to try it out and will get back to you once I've tired it out |
I'm going to close this, but feel free to reopen if necessary! |
Hey there, tried searching but couldn't find any mention of subscription query types for gql. Wondering if they are currently supported and if not if there is any plan to support them?
thanks!
The text was updated successfully, but these errors were encountered: