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.
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)]
108109struct 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
You can’t perform that action at this time.
0 commit comments