Skip to content

Commit 6a03a01

Browse files
committed
Release 0.7.0
1 parent e89648e commit 6a03a01

File tree

6 files changed

+50
-10
lines changed

6 files changed

+50
-10
lines changed

CHANGELOG.md

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

88
## Unreleased
99

10+
## 0.7.0 - 2019-03-21
11+
12+
### Changed
13+
14+
- The `selected_operation` derive attribute is deprecated. **The name of the
15+
struct under derive now has to match one of the operations defined in the query
16+
file.**
17+
- The CLI now takes the schema path as a required keyword argument.
18+
- The CLI was revamped to generate separate modules for each operation in a given query file.
19+
20+
The idea now is that if you generate code for the following document:
21+
22+
```graphql
23+
# In my_query.graphql
24+
25+
query QueryA { .... }
26+
query QueryB { .... }
27+
mutation SomeMutation { ... }
28+
```
29+
30+
The CLI generated code will look like this:
31+
32+
```rust
33+
// In my_query.rs
34+
35+
pub struct QueryA;
36+
37+
pub mod query_a { ... }
38+
39+
pub struct QueryB;
40+
41+
pub mod query_b { ... }
42+
43+
pub struct SomeMutation;
44+
45+
pub mod some_mutation { ... }
46+
```
47+
48+
That way the operations don't live in the same module, there is no risk of names clashing anymore.
49+
1050
### Fixed
1151

1252
- Changes to query files will now always trigger code generation for the corresponding modules on the next build.

graphql_client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphql_client"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
authors = ["Tom Houlé <[email protected]>"]
55
description = "Typed GraphQL requests and responses"
66
repository = "https://github.com/graphql-rust/graphql-client"
@@ -10,7 +10,7 @@ categories = ["network-programming", "web-programming", "wasm"]
1010

1111
[dependencies]
1212
failure = "0.1"
13-
graphql_query_derive = {path = "../graphql_query_derive", version = "0.6.1" }
13+
graphql_query_derive = {path = "../graphql_query_derive", version = "0.7.0" }
1414
serde = "^1.0.78"
1515
serde_derive = "1.0"
1616
serde_json = "1.0"

graphql_client_cli/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "graphql_client_cli"
33
description = "The CLI for graphql-client"
4-
version = "0.6.1"
4+
version = "0.7.0"
55
authors = ["Tom Houlé <[email protected]>"]
66
license = "Apache-2.0 OR MIT"
77
repository = "https://github.com/graphql-rust/graphql-client"
@@ -13,8 +13,8 @@ path = "src/main.rs"
1313
[dependencies]
1414
failure = "0.1"
1515
reqwest = "^0.9.0"
16-
graphql_client = { version = "0.6.1", path = "../graphql_client" }
17-
graphql_client_codegen = { path = "../graphql_client_codegen/", version = "0.6.1" }
16+
graphql_client = { version = "0.7.0", path = "../graphql_client" }
17+
graphql_client_codegen = { path = "../graphql_client_codegen/", version = "0.7.0" }
1818
structopt = "0.2"
1919
serde = "1.0"
2020
serde_derive = "1.0"

graphql_client_codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphql_client_codegen"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
authors = ["Tom Houlé <[email protected]>"]
55
description = "Utility crate for graphql_client"
66
license = "Apache-2.0 OR MIT"

graphql_client_web/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphql_client_web"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
authors = ["Tom Houlé <[email protected]>"]
55
edition = "2018"
66
description = "Typed GraphQL requests and responses (web integration)"
@@ -14,7 +14,7 @@ crate-type = ["cdylib", "rlib"]
1414

1515
[dependencies]
1616
failure = "0.1.2"
17-
graphql_client = { path = "../graphql_client", version = "0.6.1" }
17+
graphql_client = { path = "../graphql_client", version = "0.7.0" }
1818
log = "0.4.5"
1919
serde_json = "1.0.32"
2020
wasm-bindgen = "0.2.29"

graphql_query_derive/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphql_query_derive"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
authors = ["Tom Houlé <[email protected]>"]
55
description = "Utility crate for graphql_client"
66
license = "Apache-2.0 OR MIT"
@@ -13,4 +13,4 @@ proc-macro = true
1313
failure = "0.1"
1414
syn = { version = "0.15.20", features = ["extra-traits"] }
1515
proc-macro2 = { version = "0.4", features = [] }
16-
graphql_client_codegen = { path = "../graphql_client_codegen/", version = "0.6.1" }
16+
graphql_client_codegen = { path = "../graphql_client_codegen/", version = "0.7.0" }

0 commit comments

Comments
 (0)