https://github.com/obmarg/graphql-ws-client
A GraphQL over Websockets implementation for Rust
https://github.com/obmarg/graphql-ws-client
graphql graphql-client graphql-websocket graphql-ws protocol subscriptions transport websockets
Last synced: about 2 months ago
JSON representation
A GraphQL over Websockets implementation for Rust
- Host: GitHub
- URL: https://github.com/obmarg/graphql-ws-client
- Owner: obmarg
- License: apache-2.0
- Created: 2021-02-07T15:36:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T19:32:51.000Z (7 months ago)
- Last Synced: 2025-03-28T00:52:37.543Z (about 2 months ago)
- Topics: graphql, graphql-client, graphql-websocket, graphql-ws, protocol, subscriptions, transport, websockets
- Language: Rust
- Homepage:
- Size: 252 KB
- Stars: 40
- Watchers: 3
- Forks: 16
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Overview
The goal of this library is to provide a runtime agnostic implementation for
[GraphQL-over-Websockets](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md).The library only supports subscriptions for now but will eventually support queries and mutations.
It supports the websocket libraries
[async-tungstenite](https://github.com/sdroege/async-tungstenite),
[tokio-tungstenite](https://github.com/snapview/tokio-tungstenite) and
[ws-stream-wasm](https://github.com/najamelan/ws_stream_wasm), and## Integrations
The library offers integrations with some popular GraphQL clients with feature flags:
- [graphql-client](https://github.com/graphql-rust/graphql-client): `features = ["client-graphql-client"]`
- [cynic](https://github.com/obmarg/cynic): `features = ["client-cynic"]`## Documentation
The documentation is quite limited at the moment, here are some sources:
1. The provided [examples](https://github.com/obmarg/graphql-ws-client/tree/main/examples/examples)
2. The reference documentation on [docs.rs](https://docs.rs/graphql-ws-client)## Logging
By default, the library will log some messages at the `trace` level to help you debug.
It is possible to turn off the logging entirely by using the `no-logging` feature.