Skip to content

Commit e151026

Browse files
committed
Merge branch 'async-await-resolve-some-todos' of https://github.com/instrumentisto/juniper into async-await-resolve-some-todos
# Conflicts: # examples/warp_async/Cargo.toml # juniper/src/macros/tests/args.rs # juniper_codegen/src/util.rs [skip ci]
2 parents 99c0d26 + 3e5e2ae commit e151026

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

juniper/src/macros/common.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ macro_rules! __juniper_impl_trait {
77
}
88
) => {
99
impl<$($other,)*> $crate::$impl_trait<$crate::DefaultScalarValue> for $name {
10-
$($body)*
10+
$($body)+
1111
}
1212
};
1313
(
@@ -26,7 +26,7 @@ macro_rules! __juniper_impl_trait {
2626

2727
(
2828
impl< <$generic:tt $(: $bound: tt)*> $(, $other: tt)* > $impl_trait:tt for $name:ty {
29-
$($body:tt)*
29+
$($body:tt)+
3030
}
3131
) => {
3232
impl<$($other,)* $generic $(: $bound)*> $crate::$impl_trait<$generic> for $name
@@ -50,17 +50,17 @@ macro_rules! __juniper_impl_trait {
5050
$generic: $crate::ScalarValue,
5151
for<'__b> &'__b $generic: $crate::ScalarRefValue<'__b>,
5252
{
53-
$($body)*
53+
$($body)+
5454
}
5555
};
5656

5757
(
5858
impl<$scalar:ty $(, $other: tt )*> $impl_trait:tt for $name:ty {
59-
$($body:tt)*
59+
$($body:tt)+
6060
}
6161
) => {
6262
impl<$($other, )*> $crate::$impl_trait<$scalar> for $name {
63-
$($body)*
63+
$($body)+
6464
}
6565
};
6666
(

juniper/src/macros/tests/union.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
use std::marker::PhantomData;
2+
3+
use crate::{
4+
ast::InputValue,
5+
schema::model::RootNode,
6+
types::scalars::EmptyMutation,
7+
value::{DefaultScalarValue, Object, Value},
8+
};
9+
110
/*
211
312
Syntax to validate:
@@ -35,6 +44,16 @@ enum WithGenerics<T> {
3544
enum DescriptionFirst {
3645
Concrete(Concrete),
3746
}
47+
enum ResolversFirst {
48+
Concrete(Concrete),
49+
}
50+
51+
enum CommasWithTrailing {
52+
Concrete(Concrete),
53+
}
54+
enum ResolversWithTrailingComma {
55+
Concrete(Concrete),
56+
}
3857

3958
struct Root;
4059

juniper_warp/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,14 @@ Check the LICENSE file for details.
4141
#![doc(html_root_url = "https://docs.rs/juniper_warp/0.2.0")]
4242

4343
use futures::{future::poll_fn, Future};
44+
use juniper::{DefaultScalarValue, InputValue, ScalarRefValue, ScalarValue};
4445
use serde::Deserialize;
4546
use std::sync::Arc;
4647
use warp::{filters::BoxedFilter, Filter};
4748

4849
#[cfg(feature = "async")]
4950
use futures03::future::{FutureExt, TryFutureExt};
5051

51-
use juniper::{DefaultScalarValue, InputValue, ScalarRefValue, ScalarValue};
52-
5352
#[derive(Debug, serde_derive::Deserialize, PartialEq)]
5453
#[serde(untagged)]
5554
#[serde(bound = "InputValue<S>: Deserialize<'de>")]

0 commit comments

Comments
 (0)