Error compiling in resolve function
評価
この issue はまだ評価されていません。
説明
Hi, i tried compile this schema and getting error in resolve function in versions 4.9.5 and 5.0.0-rc4.
input Type {
input1: Int
}
type ReturnObject {
returnField: String!
}
type Query {
field0(input: Type): String!
field1(input: Type): ReturnObject!
}
in generated schema file QueryObject, has different function signature for input fields, one of them optional and another unique. it depend on scalar or non-scalar returning type for field.
[[nodiscard("unnecessary call")]] virtual service::AwaitableScalar<std::string> getField0(service::FieldParams&& params, std::optional<Type>&& inputArg) const = 0;
[[nodiscard("unnecessary call")]] virtual service::AwaitableObject<std::shared_ptr<ReturnObject>> getField1(service::FieldParams&& params, std::unique_ptr<Type>&& inputArg) const = 0;
This behaviour invoke compile error in resolveField0
service::AwaitableResolver Query::resolveField0(service::ResolverParams&& params) const
{
auto argInput = service::ModifiedArgument<Type>::require<service::TypeModifier::Nullable>("input", params.arguments);
std::unique_lock resolverLock(_resolverMutex);
service::SelectionSetParams selectionSetParams { static_cast<const service::SelectionSetParams&>(params) };
auto directives = std::move(params.fieldDirectives);
auto result = _pimpl->getField0(service::FieldParams { std::move(selectionSetParams), std::move(directives) }, std::move(argInput)); // HERE
resolverLock.unlock();
return service::ModifiedResult<std::string>::convert(std::move(result), std::move(params));
}
Since argInput becomes a unique_ptr, as I see it, it depends on the type of the input parameter for field0
- 主要言語
- C++
- スター
- 350
- フォーク
- 56
- 平均マージ
- 2時間 33分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/cppgraphqlgen のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
microsoft/cppgraphqlgen#360 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
microsoft/cppgraphqlgen#350 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoft/cppgraphqlgen#347 ·
-
microsoft/cppgraphqlgen#346 · コメント 4 件 · リアクション 1 件 · 担当者 2 名 ·
-
microsoft/cppgraphqlgen#330 · リアクション 1 件 · 担当者 1 名 ·
microsoft/cppgraphqlgen の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
autowarefoundation/autoware_universe#13413 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
automated-analysis bug memory-safety
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gazebosim/gz-sensors#662 · コメント 1 件 ·