You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ A typed GraphQL client library for Rust.
13
13
- Works in the browser (WebAssembly)
14
14
- Subscriptions support (serialization-deserialization only at the moment)
15
15
- Copies documentation from the GraphQL schema to the generated Rust code
16
+
- Arbitrary derives on the generated responses
16
17
17
18
## Getting started
18
19
@@ -74,6 +75,21 @@ A typed GraphQL client library for Rust.
74
75
75
76
[A complete example using the GitHub GraphQL API is available](https://github.com/tomhoule/graphql-client/tree/master/examples/github), as well as sample [rustdoc output](https://www.tomhoule.com/docs/example_module/).
76
77
78
+
## Deriving specific traits on the response
79
+
80
+
The generated response types always derive `serde::Deserialize` but you may want to print them (`Debug`), compare them (`PartialEq`) or derive any other trait on it. You can achieve this with the `response_derives` option of the `graphql` attribute. Example:
0 commit comments