Skip to content

Commit

Permalink
Integrate with the uuid08 #907
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed May 3, 2022
1 parent f5517f5 commit c00e22c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 9 deletions.
36 changes: 30 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ async-graphql-parser = { path = "parser", version = "4.0.0-alpha.0" }
async-stream = "0.3.0"
async-trait = "0.1.48"
fnv = "1.0.7"
futures-util = { version = "0.3.0", default-features = false, features = ["io", "sink"] }
futures-util = { version = "0.3.0", default-features = false, features = [
"io",
"sink",
] }
indexmap = "1.6.2"
once_cell = "1.7.2"
pin-project-lite = "0.2.6"
Expand All @@ -53,20 +56,36 @@ fast_chemail = "0.9.6"

# Feature optional dependencies
bson = { version = "2.0.0", optional = true, features = ["chrono-0_4"] }
chrono = { version = "0.4.19", optional = true, default-features = false, features = ["clock", "std"] }
chrono = { version = "0.4.19", optional = true, default-features = false, features = [
"clock",
"std",
] }
chrono-tz = { version = "0.6.1", optional = true }
hashbrown = { version = "0.12.0", optional = true }
iso8601-duration = { version = "0.1.0", optional = true }
log = { version = "0.4.16", optional = true }
secrecy = { version = "0.8.0", optional = true }
tracinglib = { version = "0.1.25", optional = true, package = "tracing" }
tracing-futures = { version = "0.2.5", optional = true, features = ["std-future", "futures-03"] }
opentelemetry = { version = "0.17.0", optional = true, default-features = false, features = ["trace"] }
tracing-futures = { version = "0.2.5", optional = true, features = [
"std-future",
"futures-03",
] }
opentelemetry = { version = "0.17.0", optional = true, default-features = false, features = [
"trace",
] }
uuid = { version = "1.0.0", optional = true, features = ["v4", "serde"] }
uuid08 = { version = "0.8", package = "uuid", optional = true, features = [
"v4",
"serde",
] }
rust_decimal = { version = "1.14.3", optional = true }
url = { version = "2.2.1", optional = true }
smol_str = { version = "0.1.21", optional = true }
time = { version = "0.3.5", optional = true, features = ["parsing", "formatting", "macros"] }
time = { version = "0.3.5", optional = true, features = [
"parsing",
"formatting",
"macros",
] }
tokio = { version = "1.17.0", features = ["sync"], optional = true }

# Non-feature optional dependencies
Expand All @@ -79,7 +98,12 @@ serde_cbor = { version = "0.11.1", optional = true }
zxcvbn = { version = "2.1.2", optional = true }

[dev-dependencies]
tokio = { version = "1.4.0", features = ["macros", "rt-multi-thread", "sync", "time"] }
tokio = { version = "1.4.0", features = [
"macros",
"rt-multi-thread",
"sync",
"time",
] }
futures-channel = "0.3.13"

[package.metadata.docs.rs]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ This crate offers the following features, all of which are not activated by defa
- `chrono-tz`: Integrate with the [`chrono-tz` crate](https://crates.io/crates/chrono-tz).
- `url`: Integrate with the [`url` crate](https://crates.io/crates/url).
- `uuid`: Integrate with the [`uuid` crate](https://crates.io/crates/uuid).
- `uuid08`: Integrate with the [`uuid 0.8` crate](https://crates.io/crates/uuid/0.8.2).
- `string_number`: Enable the [StringNumber](types/struct.StringNumber.html).
- `dataloader`: Support [DataLoader](dataloader/struct.DataLoader.html).
- `secrecy`: Integrate with the [`secrecy` crate](https://crates.io/crates/secrecy).
Expand All @@ -81,6 +82,7 @@ This crate offers the following features, all of which are not activated by defa
- `smol_str`: Integrate with the [`smol_str` crate](https://crates.io/crates/smol_str).
- `hashbrown`: Integrate with the [`hashbrown` crate](https://github.com/rust-lang/hashbrown).
- `time`: Integrate with the [`time` crate](https://github.com/time-rs/time).
- `tokio-sync` Integrate with the [`tokio::sync::RwLock`](https://docs.rs/tokio/1.18.1/tokio/sync/struct.RwLock.html) and [`tokio::sync::Mutex`](https://docs.rs/tokio/1.18.1/tokio/sync/struct.Mutex.html).

## Apollo Studio

Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,18 @@
//! - `chrono-tz`: Integrate with the [`chrono-tz` crate](https://crates.io/crates/chrono-tz).
//! - `url`: Integrate with the [`url` crate](https://crates.io/crates/url).
//! - `uuid`: Integrate with the [`uuid` crate](https://crates.io/crates/uuid).
//! - `uuid08`: Integrate with the [`uuid 0.8` crate](https://crates.io/crates/uuid/0.8.2).
//! - `string_number`: Enable the
//! [StringNumber](types/struct.StringNumber.html).
//! - `dataloader`: Support [DataLoader](dataloader/struct.DataLoader.html).
//! - `secrecy`: Integrate with the [`secrecy` crate](https://crates.io/crates/secrecy).
//! - `decimal`: Integrate with the [`rust_decimal` crate](https://crates.io/crates/rust_decimal).
//! - `cbor`: Support for [serde_cbor](https://crates.io/crates/serde_cbor).
//! - `smol_str`: Integrate with the [`smol_str` crate](https://crates.io/crates/smol_str).
//! - `hashbrown`: Integrate with the [`hashbrown` crate](https://github.com/rust-lang/hashbrown).
//! - `time`: Integrate with the [`time` crate](https://github.com/time-rs/time).
//! - `tokio-sync` Integrate with the [`tokio::sync::RwLock`](https://docs.rs/tokio/1.18.1/tokio/sync/struct.RwLock.html)
//! and [`tokio::sync::Mutex`](https://docs.rs/tokio/1.18.1/tokio/sync/struct.Mutex.html).
//!
//! ## Integrations
//!
Expand Down
4 changes: 3 additions & 1 deletion src/types/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ mod list;
mod non_zero_integers;
mod optional;
mod string;

#[cfg(feature = "tokio-sync")]
mod tokio;

#[cfg(feature = "bson")]
Expand All @@ -37,5 +39,5 @@ mod time_offset_date_time;
mod time_primitive_date_time;
#[cfg(feature = "url")]
mod url;
#[cfg(feature = "uuid")]
#[cfg(any(feature = "uuid", feature = "uuid08"))]
mod uuid;
2 changes: 0 additions & 2 deletions src/types/external/tokio/sync/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#[cfg(feature = "tokio-sync")]
mod mutex;
#[cfg(feature = "tokio-sync")]
mod rw_lock;
3 changes: 3 additions & 0 deletions src/types/external/uuid.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#[cfg(feature = "uuid")]
use uuid::Uuid;
#[cfg(feature = "uuid08")]
use uuid08::Uuid;

use crate::{InputValueError, InputValueResult, Scalar, ScalarType, Value};

Expand Down

0 comments on commit c00e22c

Please sign in to comment.