-
Notifications
You must be signed in to change notification settings - Fork 46
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
What is the chance to add Subscription ? #11
Comments
Thanks. This is a good suggestion. I will look into it. The newer python versions support async out of the box. I am not 100% familiar with subscribe, but I imagine passing an async iterable to a call back function. |
If you need i can create server GraphQL with few subscription to test? |
That would be nice thanks. This might take me some time. If anyone would like to contribute I'm happy to review. |
Any chance to write anything in actual month?? |
Yea I can. Can you get the test server up? |
ofc, give me 2 days. I will send info |
Any updates on the issue? |
I haven't had any time to work on this, but I am still waiting for the test server info. |
Websocket support would indeed be great, so we can have subscriptions :) |
Can you provide more details on how you would like to use a subscription API? It will help me determine the best interface. |
Sorry I fear I'm not familiar enough with Python and its async library to provide a relevant feedback in API design. In JS, this doc shows how subscription client is created, and here is the subscription API: apolloClient.subscribe({
query: gql`
subscription onNewItem {
newItemCreated {
id
}
}`,
variables: {}
}).subscribe({
next (data) {
// Notify your application with the new arrived data
}
}); Also, you may have a look at this Python gql client that apparently supports subscriptions: https://github.com/tdip/gql-subscriptions/tree/develop |
Thanks, this is helpful. I wrote something far simpler than tdip's gql subscriptions package. I also use I'm thinking of keeping the API very basic so the keep-alive problem is transferred to the developer for now. The only use case I'm testing against is whenever a subscription is received, the payload is printed. I can commit the code this weekend. |
Hey, your client works perfect with Query and Mutation.
Its any chance to add Subscription support >>??
The text was updated successfully, but these errors were encountered: