'Python graphql websocket subscription client
I'm starting a test project where I'm required to validate graphql websocket subscription data from a python test framework. Typically I'll just write my own libraries for interacting with the various servers, but I cannot find a reasonable description of the protocol in this case.
My question(s) is as follows:
- Is there a reasonable python library out there to function as a graphql subscription client?
- [and|or] Is there some sort of RFC, or detailed protocol description so I can just write my own?
Sorry for the basic question in advance, My google-fu is weak this morning and while I've found several graphql python libraries, I've been struggling to find information on a reasonable client.
Thanks!
Solution 1:[1]
I just wrote my own client using this document as a protocol description
And this Python library to retrieve the constants
Solution 2:[2]
You can use the graphql-python/gql package, it supports the apollo and graphql-ws protocols.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | sehafoc |
| Solution 2 | leszek.hanusz |
