Skip to content

Commit 942373b

Browse files
committed
Update README.md
1 parent bc5e9f1 commit 942373b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ A typed GraphQL client library for Rust.
1919
- Supports setting GraphQL fields as deprecated and having the Rust compiler check
2020
their use.
2121
- Optional reqwest-based client for boilerplate-free API calls from browsers.
22+
- Implicit and explicit null support.
2223

2324
## Getting started
2425

@@ -107,6 +108,21 @@ use graphql_client::GraphQLQuery;
107108
)]
108109
struct UnionQuery;
109110
```
111+
## Implicit Null
112+
113+
The generated code will skip the serialization of `None` values. By default it's `false`.
114+
115+
```rust
116+
use graphql_client::GraphQLQuery;
117+
118+
#[derive(GraphQLQuery)]
119+
#[graphql(
120+
schema_path = "tests/unions/union_schema.graphql",
121+
query_path = "tests/unions/union_query.graphql",
122+
skip_serializing_none = "true"
123+
)]
124+
struct UnionQuery;
125+
```
110126

111127
## Custom scalars
112128

0 commit comments

Comments
 (0)