diff --git a/juniper/src/macros/reflect.rs b/juniper/src/macros/reflect.rs index 4cba097f..155786c8 100644 --- a/juniper/src/macros/reflect.rs +++ b/juniper/src/macros/reflect.rs @@ -1,6 +1,6 @@ //! Compile-time reflection of Rust types into GraphQL types. -use std::{rc::Rc, sync::Arc}; +use std::{collections::HashSet, rc::Rc, sync::Arc}; use futures::future::BoxFuture; @@ -72,6 +72,10 @@ impl> BaseType for Vec { const NAME: Type = T::NAME; } +impl> BaseType for HashSet { + const NAME: Type = T::NAME; +} + impl> BaseType for [T] { const NAME: Type = T::NAME; } @@ -133,6 +137,10 @@ impl> BaseSubTypes for Vec { const NAMES: Types = T::NAMES; } +impl> BaseSubTypes for HashSet { + const NAMES: Types = T::NAMES; +} + impl> BaseSubTypes for [T] { const NAMES: Types = T::NAMES; } @@ -229,6 +237,10 @@ impl> WrappedType for Vec { const VALUE: u128 = T::VALUE * 10 + 3; } +impl> WrappedType for HashSet { + const VALUE: u128 = T::VALUE * 10 + 3; +} + impl> WrappedType for [T] { const VALUE: u128 = T::VALUE * 10 + 3; }