Skip to content
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

readme: document graphql-ws-client as solution for runtime subscriptions #527

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 9 additions & 66 deletions Cargo.lock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird that the lock file is changed in a documentation PR

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A typed GraphQL client library for Rust.
- Precise types for query variables and responses.
- Supports GraphQL fragments, objects, unions, inputs, enums, custom scalars and input objects.
- Works in the browser (WebAssembly).
- Subscriptions support (serialization-deserialization only at the moment).
- Subscriptions support.
- Copies documentation from the GraphQL schema to the generated Rust code.
- Arbitrary derives on the generated responses.
- Arbitrary custom scalars.
Expand Down Expand Up @@ -185,6 +185,12 @@ pub struct Heights;

There is an example [in the tests](./graphql_client/tests/operation_selection).

## Subscriptions

The subscription variable and response shapes are handled by code generation the same way as for other operation types.

For the runtime part of the story, we recommend the awesome [graphql-ws-client](https://crates.io/crates/graphql-ws-client) by @obmarg.

## Documentation for the generated modules

You can use `cargo doc --document-private-items` to generate rustdoc documentation on the generated code.
Expand Down