Skip to content

Commit 75df811

Browse files
author
Rafał Hibner
committed
Merge branch 'next' of https://github.com/gitmodimo/cppgraphqlgen into next
2 parents 75522bc + 37a2d71 commit 75df811

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/graphqlservice/GraphQLService.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,11 @@ class [[nodiscard("unnecessary construction")]] AwaitableObject
600600
AwaitableObject(
601601
U&& value, std::enable_if_t<!std::is_assignable_v<T, U> && is_future<U>::value>* = nullptr)
602602
: _value(std::async([value = std::forward<U>(value)]() mutable {
603-
return GraphQLBuilder<T>::build(value.get());
603+
if constexpr(std::is_assignable_v<T, decltype(value.get())>){
604+
return value.get();
605+
}else{
606+
return GraphQLBuilder<T>::build(value.get());
607+
}
604608
}))
605609
{
606610
}

0 commit comments

Comments
 (0)