Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unused dependencies #20

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ edition = "2021"
async-graphql = { version = "6.0.11", features = ["bson", "chrono", "uuid", "log"] }
async-graphql-axum = "6.0.11"
tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] }
hyper = "1.0.1"
axum = { version = "0.6.0", features = ["headers", "macros"] }
slab = "0.4.2"
mongodb = "2.8.0"
serde = "1.0.193"
futures = "0.3.30"
bson = "2.8.1"
clap = { version = "4.4.13", features = ["derive"] }
uuid = { version = "1.6.1", features = ["v4", "serde"] }
mongodb-cursor-pagination = "0.3.2"
tonic = "0.8"
json = "0.12.4"
log = "0.4.20"
simple_logger = "4.3.3"
Expand Down
2 changes: 1 addition & 1 deletion src/mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async fn update_name(
Ok(())
}

/// Checks if product variants and user in AddWishlistInput are in the system (MongoDB database populated with events).
/// Checks if product variants and user in CreateWishlistInput are in the system (MongoDB database populated with events).
async fn validate_input(db_client: &Database, input: &CreateWishlistInput) -> Result<()> {
let product_variant_collection: Collection<ProductVariant> =
db_client.collection::<ProductVariant>("product_variants");
Expand Down
17 changes: 2 additions & 15 deletions src/wishlist.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::{cmp::Ordering, collections::HashSet};

use async_graphql::{
connection::{Edge, EmptyFields},
ComplexObject, OutputType, Result, SimpleObject,
ComplexObject, Result, SimpleObject,
};
use bson::datetime::DateTime;
use bson::Uuid;
Expand Down Expand Up @@ -91,16 +90,4 @@ impl From<Wishlist> for Uuid {
fn from(value: Wishlist) -> Self {
value._id
}
}

pub struct NodeWrapper<Node>(pub Node);

impl<Node> From<NodeWrapper<Node>> for Edge<uuid::Uuid, Node, EmptyFields>
where
Node: Into<uuid::Uuid> + OutputType + Clone,
{
fn from(value: NodeWrapper<Node>) -> Self {
let uuid = Into::<uuid::Uuid>::into(value.0.clone());
Edge::new(uuid, value.0)
}
}
}
Loading