Skip to content

Commit 64c0fea

Browse files
authored
Merge pull request #342 from hashintel/jk/disable-derive-feature
Feat: allow disabling derive
2 parents 34bbd67 + c8b235c commit 64c0fea

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

graphql_client/Cargo.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ authors = ["Tom Houlé <tom@tomhoule.com>"]
55
description = "Typed GraphQL requests and responses"
66
repository = "https://github.com/graphql-rust/graphql-client"
77
license = "Apache-2.0 OR MIT"
8-
keywords = ["graphql", "api", "web", "webassembly", "wasm"]
8+
keywords = ["graphql", "api", "web", "webassembly", "wasm"]
99
categories = ["network-programming", "web-programming", "wasm"]
1010
edition = "2018"
1111

1212
[dependencies]
1313
doc-comment = "^0.3"
1414
anyhow = { version = "1.0", optional = true }
1515
thiserror = { version = "1.0", optional = true }
16-
graphql_query_derive = { path = "../graphql_query_derive", version = "0.9.0" }
16+
graphql_query_derive = { path = "../graphql_query_derive", version = "0.9.0", optional = true }
1717
serde_json = "1.0"
1818
serde = { version = "^1.0.78", features = ["derive"] }
1919

@@ -32,13 +32,7 @@ optional = true
3232
[dependencies.web-sys]
3333
version = "^0.3"
3434
optional = true
35-
features = [
36-
"Headers",
37-
"Request",
38-
"RequestInit",
39-
"Response",
40-
"Window",
41-
]
35+
features = ["Headers", "Request", "RequestInit", "Response", "Window"]
4236

4337
[dependencies.wasm-bindgen]
4438
version = "^0.2"
@@ -56,6 +50,7 @@ reqwest = "^0.9"
5650
wasm-bindgen-test = "^0.2"
5751

5852
[features]
53+
default = ["graphql_query_derive"]
5954
web = [
6055
"anyhow",
6156
"thiserror",

graphql_client/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#![deny(missing_docs)]
66
#![warn(rust_2018_idioms)]
77

8+
#[cfg(feature = "graphql_query_derive")]
89
#[allow(unused_imports)]
910
#[macro_use]
1011
extern crate graphql_query_derive;
1112

13+
#[cfg(feature = "graphql_query_derive")]
1214
#[doc(hidden)]
1315
pub use graphql_query_derive::*;
1416

0 commit comments

Comments
 (0)