Skip to content

Commit 74158da

Browse files
committed
Update method signatures in resolvers.md
1 parent 49858aa commit 74158da

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/resolvers.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ schema {
3434

3535
Executing a query or mutation starts by calling `Request::resolve` from [GraphQLService.h](../include/graphqlservice/GraphQLService.h):
3636
```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;
3840
```
3941
By default, the `std::future` results are resolved on-demand but synchronously,
4042
using `std::launch::deferred` with the `std::async` function. You can also use
4143
an override of `Request::resolve` which lets you substitute the
4244
`std::launch::async` option to begin executing the query on multiple threads
4345
in parallel:
4446
```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;
4650
```
4751

4852
### `graphql::service::Request` and `graphql::<schema>::Operations`
@@ -66,7 +70,7 @@ recursively call the `resolvers` for each of the `fields` in the nested
6670
`graphql::today::object::Appointment` object from the `today` sample in
6771
[AppointmentObject.h](../samples/separate/AppointmentObject.h).
6872
```cpp
69-
std::future<response::Value> resolveId(service::ResolverParams&& params);
73+
std::future<service::ResolverResult> resolveId(service::ResolverParams&& params);
7074
```
7175
In this example, the `resolveId` method invokes `getId`:
7276
```cpp

0 commit comments

Comments
 (0)