Skip to content

Commit 02b6534

Browse files
committed
Fix tests
1 parent 16b5035 commit 02b6534

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

integration_tests/juniper_tests/src/codegen/derive_input_object.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use fnv::FnvHashMap;
22

33
use juniper::{
4-
self, DefaultScalarValue, FromInputValue, GraphQLInputObject, GraphQLType, InputValue,
4+
DefaultScalarValue, FromInputValue, GraphQLInputObject, GraphQLType, GraphQLValue, InputValue,
55
ToInputValue,
66
};
77

@@ -63,9 +63,6 @@ impl<'a> ToInputValue for &'a Fake {
6363
}
6464

6565
impl<'a> GraphQLType<DefaultScalarValue> for &'a Fake {
66-
type Context = ();
67-
type TypeInfo = ();
68-
6966
fn name(_: &()) -> Option<&'static str> {
7067
None
7168
}
@@ -85,6 +82,15 @@ impl<'a> GraphQLType<DefaultScalarValue> for &'a Fake {
8582
}
8683
}
8784

85+
impl<'a> GraphQLValue<DefaultScalarValue> for &'a Fake {
86+
type Context = ();
87+
type TypeInfo = ();
88+
89+
fn type_name<'i>(&self, info: &'i Self::TypeInfo) -> Option<&'i str> {
90+
<Self as GraphQLType>::name(info)
91+
}
92+
}
93+
8894
#[derive(GraphQLInputObject, Debug, PartialEq)]
8995
#[graphql(scalar = DefaultScalarValue)]
9096
struct WithLifetime<'a> {

0 commit comments

Comments
 (0)