File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ A typed GraphQL client library for Rust.
19
19
- Supports setting GraphQL fields as deprecated and having the Rust compiler check
20
20
their use.
21
21
- Optional reqwest-based client for boilerplate-free API calls from browsers.
22
+ - Implicit and explicit null support.
22
23
23
24
## Getting started
24
25
@@ -107,6 +108,21 @@ use graphql_client::GraphQLQuery;
107
108
)]
108
109
struct UnionQuery ;
109
110
```
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
+ ```
110
126
111
127
## Custom scalars
112
128
You can’t perform that action at this time.
0 commit comments