Skip to content

Commit 193d461

Browse files
committed
Work on async reqwest-based client feature isolation
1 parent 5a1484b commit 193d461

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

graphql_client/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ serde = { version = "^1.0.78", features = ["derive"] }
1616
serde_json = "1.0"
1717
doc-comment = "0.3.1"
1818

19+
[dependencies.reqwest]
20+
version = "0.9.16"
21+
optional = true
22+
23+
[dependencies.futures-preview]
24+
version = "0.3.0-alpha.16"
25+
optional = true
26+
features = ["compat"]
27+
1928
[dependencies.futures]
2029
version = "0.1"
2130
optional = true
@@ -54,6 +63,7 @@ version = "0.9.16"
5463
version = "0.2.43"
5564

5665
[features]
66+
native = ["reqwest", "futures-preview"]
5767
web = [
5868
"futures",
5969
"js-sys",

graphql_client/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//!
33
//! The main interface to this library is the custom derive that generates modules from a GraphQL query and schema. See the docs for the [`GraphQLQuery`] trait for a full example.
44
5+
#![feature(async_await)]
56
#![deny(missing_docs)]
67
#![deny(rust_2018_idioms)]
78
#![deny(warnings)]
@@ -15,6 +16,8 @@ pub use graphql_query_derive::*;
1516

1617
use serde::*;
1718

19+
#[cfg(feature = "native")]
20+
pub mod native;
1821
#[cfg(feature = "web")]
1922
pub mod web;
2023

0 commit comments

Comments
 (0)