Skip to content

Commit f318eab

Browse files
committed
graphql_client_codegen: trim whitespace from derives
This is done already in the `response_derives`, but was missed for variables.
1 parent a6a8972 commit f318eab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## Unreleased
99

10+
- The `variables_derives` now trims whitespace from individual derivation traits.
11+
1012
## 0.10.0 - 2021-07-04
1113

1214
- The `web` feature is dropped. You can now use a `reqwest::Client` instead of the custom HTTP client.

graphql_client_codegen/src/codegen_options.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ impl GraphQLClientCodegenOptions {
102102
.variables_derives
103103
.as_deref()
104104
.into_iter()
105-
.flat_map(|s| s.split(','));
105+
.flat_map(|s| s.split(','))
106+
.map(|s| s.trim());
106107

107108
std::iter::once("Serialize").chain(additional)
108109
}

0 commit comments

Comments
 (0)