Skip to content

Commit 962b23e

Browse files
authored
Fix/no default features for diesel (#36)
* Do not depend on diesel with default features enabled + add an additional path dependency for wundergraph_derives * Fix ci * Fix compiler warning * Fix problem with nullable reference filters
1 parent 38aff27 commit 962b23e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

wundergraph/src/query_builder/selection/filter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub struct Filter<F, T> {
6464
or: Option<Vec<Filter<F, T>>>,
6565
not: Option<Box<Not<Filter<F, T>>>>,
6666
inner: F,
67-
p: PhantomData<(T)>,
67+
p: PhantomData<T>,
6868
}
6969

7070
impl<F, T> Nameable for Filter<F, T>

wundergraph/src/query_builder/selection/filter/reference_filter.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,17 @@ NullableSelect<Select<Filter<<C2::Table as AsQuery>::Query, I::Ret>, C2>>: Query
108108
impl<C, I, C2, A> Nameable for ReferenceFilter<C, I, C2, A>
109109
where
110110
I: Nameable,
111+
A: Nameable,
111112
{
112113
fn name() -> String {
113-
I::name()
114+
let a = A::name();
115+
let i = I::name();
116+
117+
if a.is_empty() {
118+
i
119+
} else {
120+
format!("{}_{}", a, i)
121+
}
114122
}
115123
}
116124

0 commit comments

Comments
 (0)