-
Notifications
You must be signed in to change notification settings - Fork 185
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
Adding a new transport class to handle Phoenix channels #100
Adding a new transport class to handle Phoenix channels #100
Conversation
Not an expert on Elixir related framework/libraries but this transport class could be added as extra optional feature so any Elixir (Phoenix in this case) user can install it by running the following command: pip install gql[phoenix-transport] @leszekhanusz what do you think? Also, I will take a look at it whenever I can, currently busy with some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very interesting.
I like how this transport inherits the websockets transport.
I tried to find a spec which describe the protocol implemented here but I have not found it. Could you please add a link to it ?
@leszekhanusz Unfortunately I didn't find any specs for Phoenix channels either. There are pointers to some docs in this thread, but i've mainly done reverse engineering on the C# Phoenix client project. Btw I will take your feedbacks into account. |
@leszekhanusz I finished taking your comments into account. |
Do you need me to further improve the test coverage on this PR ? |
The So don't worry about it at the moment. |
@acatinon updating with the latest changes from master should bring coverage to 100%, also there is few mypy errors on the phoenix transport. |
@KingDarBoja Done. |
This one is almost ready to merge, only thing left is increasing coverage to 100%. |
…ite recursive calls (graphql-python#132) Co-authored-by: xzhang2 <[email protected]>
…& no cover pragmas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage reached 100% 🚀
I cheated a little and just added pragmas for the few remaining lines... |
@acatinon Thanks again for this PR and sorry for the delay |
First of all, thank you for this great library !
I'm building a tool that connect to a server built on Absinthe. This toolkit relies on the Phoenix framework channels feature to handle GraphQL subscriptions.
So I created a
PhoenixChannelWebsocketsTransport
class that implement all the logic to subscribe and receive data from a Phoenix channel.Of course I'm open to any suggestions to improve this PR