@@ -106,6 +106,7 @@ Query::Query()
106
106
{ " tasksById" , [this ](service::ResolverParams&& params) { return resolveTasksById (std::move (params)); } },
107
107
{ " unreadCountsById" , [this ](service::ResolverParams&& params) { return resolveUnreadCountsById (std::move (params)); } },
108
108
{ " nested" , [this ](service::ResolverParams&& params) { return resolveNested (std::move (params)); } },
109
+ { " unimplemented" , [this ](service::ResolverParams&& params) { return resolveUnimplemented (std::move (params)); } },
109
110
{ " __typename" , [this ](service::ResolverParams&& params) { return resolve__typename (std::move (params)); } },
110
111
{ " __schema" , [this ](service::ResolverParams&& params) { return resolve__schema (std::move (params)); } },
111
112
{ " __type" , [this ](service::ResolverParams&& params) { return resolve__type (std::move (params)); } }
@@ -282,6 +283,22 @@ std::future<response::Value> Query::resolveNested(service::ResolverParams&& para
282
283
return service::ModifiedResult<NestedType>::convert (std::move (result), std::move (params));
283
284
}
284
285
286
+ std::future<response::StringType> Query::getUnimplemented (service::FieldParams&&) const
287
+ {
288
+ std::promise<response::StringType> promise;
289
+
290
+ promise.set_exception (std::make_exception_ptr (std::runtime_error (R"ex( Query::getUnimplemented is not implemented)ex" )));
291
+
292
+ return promise.get_future ();
293
+ }
294
+
295
+ std::future<response::Value> Query::resolveUnimplemented (service::ResolverParams&& params)
296
+ {
297
+ auto result = getUnimplemented (service::FieldParams (params, std::move (params.fieldDirectives )));
298
+
299
+ return service::ModifiedResult<response::StringType>::convert (std::move (result), std::move (params));
300
+ }
301
+
285
302
std::future<response::Value> Query::resolve__typename (service::ResolverParams&& params)
286
303
{
287
304
std::promise<response::StringType> promise;
@@ -1205,7 +1222,8 @@ void AddTypesToSchema(std::shared_ptr<introspection::Schema> schema)
1205
1222
std::make_shared<introspection::Field>(" unreadCountsById" , R"md( )md" , std::unique_ptr<std::string>(nullptr ), std::vector<std::shared_ptr<introspection::InputValue>>({
1206
1223
std::make_shared<introspection::InputValue>(" ids" , R"md( )md" , schema->WrapType (introspection::__TypeKind::NON_NULL, schema->WrapType (introspection::__TypeKind::LIST, schema->WrapType (introspection::__TypeKind::NON_NULL, schema->LookupType (" ID" )))), R"gql( )gql" )
1207
1224
}), schema->WrapType (introspection::__TypeKind::NON_NULL, schema->WrapType (introspection::__TypeKind::LIST, schema->LookupType (" Folder" )))),
1208
- std::make_shared<introspection::Field>(" nested" , R"md( )md" , std::unique_ptr<std::string>(nullptr ), std::vector<std::shared_ptr<introspection::InputValue>>(), schema->WrapType (introspection::__TypeKind::NON_NULL, schema->LookupType (" NestedType" )))
1225
+ std::make_shared<introspection::Field>(" nested" , R"md( )md" , std::unique_ptr<std::string>(nullptr ), std::vector<std::shared_ptr<introspection::InputValue>>(), schema->WrapType (introspection::__TypeKind::NON_NULL, schema->LookupType (" NestedType" ))),
1226
+ std::make_shared<introspection::Field>(" unimplemented" , R"md( )md" , std::unique_ptr<std::string>(nullptr ), std::vector<std::shared_ptr<introspection::InputValue>>(), schema->WrapType (introspection::__TypeKind::NON_NULL, schema->LookupType (" String" )))
1209
1227
});
1210
1228
typePageInfo->AddFields ({
1211
1229
std::make_shared<introspection::Field>(" hasNextPage" , R"md( )md" , std::unique_ptr<std::string>(nullptr ), std::vector<std::shared_ptr<introspection::InputValue>>(), schema->WrapType (introspection::__TypeKind::NON_NULL, schema->LookupType (" Boolean" ))),
0 commit comments