Integrate with the `uuid08` #907

This commit is contained in:
Sunli 2022-05-03 15:52:50 +08:00
parent 856839923d
commit fef97e7458
6 changed files with 42 additions and 9 deletions

View File

@ -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"
@ -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
@ -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]

View File

@ -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).
@ -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

View File

@ -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
//!

View File

@ -11,6 +11,8 @@ mod list;
mod non_zero_integers;
mod optional;
mod string;
#[cfg(feature = "tokio-sync")]
mod tokio;
#[cfg(feature = "bson")]
@ -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;

View File

@ -1,4 +1,2 @@
#[cfg(feature = "tokio-sync")]
mod mutex;
#[cfg(feature = "tokio-sync")]
mod rw_lock;

View File

@ -1,4 +1,7 @@
#[cfg(feature = "uuid")]
use uuid::Uuid;
#[cfg(feature = "uuid08")]
use uuid08::Uuid;
use crate::{InputValueError, InputValueResult, Scalar, ScalarType, Value};