@@ -34,15 +34,19 @@ schema {
34
34
35
35
Executing a query or mutation starts by calling ` Request::resolve ` from [ GraphQLService.h] ( ../include/graphqlservice/GraphQLService.h ) :
36
36
``` cpp
37
- std::future<response::Value> resolve (const std::shared_ptr<RequestState >& state, peg::ast& query, const std::string& operationName, response::Value&& variables) const;
37
+ GRAPHQLSERVICE_EXPORT std::future<response::Value> resolve (
38
+ const std::shared_ptr<RequestState>& state, peg::ast& query,
39
+ const std::string& operationName, response::Value&& variables) const;
38
40
```
39
41
By default, the `std::future` results are resolved on-demand but synchronously,
40
42
using `std::launch::deferred` with the `std::async` function. You can also use
41
43
an override of `Request::resolve` which lets you substitute the
42
44
`std::launch::async` option to begin executing the query on multiple threads
43
45
in parallel:
44
46
```cpp
45
- std::future<response::Value> resolve(std::launch launch, const std::shared_ptr<RequestState>& state, peg::ast& query, const std::string& operationName, response::Value&& variables) const;
47
+ GRAPHQLSERVICE_EXPORT std::future<response::Value> resolve(std::launch launch,
48
+ const std::shared_ptr<RequestState>& state, peg::ast& query,
49
+ const std::string& operationName, response::Value&& variables) const;
46
50
```
47
51
48
52
### ` graphql::service::Request ` and ` graphql::<schema>::Operations `
@@ -66,7 +70,7 @@ recursively call the `resolvers` for each of the `fields` in the nested
66
70
` graphql::today::object::Appointment ` object from the ` today ` sample in
67
71
[ AppointmentObject.h] ( ../samples/separate/AppointmentObject.h ) .
68
72
``` cpp
69
- std::future<response::Value > resolveId (service::ResolverParams&& params);
73
+ std::future<service::ResolverResult > resolveId (service::ResolverParams&& params);
70
74
```
71
75
In this example, the `resolveId` method invokes `getId`:
72
76
```cpp
0 commit comments