@@ -49,19 +49,25 @@ If you use the async version of `subscribe` and `unsubscribe` which take a
49
49
` Subscription ` object to the ` Request ` /` Operations ` constructor, you will get
50
50
additional callbacks with the ` ResolverContext::NotifySubscribe ` and
51
51
` ResolverContext::NotifyUnsubscribe ` values for the
52
- ` FieldParams::resolverContext ` member. These are passed as part of the
53
- ` subscribe ` and ` unsubscribe ` calls on the default subscription object, and
52
+ ` FieldParams::resolverContext ` member. These are passed by the async
53
+ ` subscribe ` and ` unsubscribe ` calls to the default subscription object, and
54
54
they provide an opportunity to acquire or release resources that are required
55
- to implement the subscription. You can provide separate implementations of the
56
- ` Subscription ` object as the default in the ` Operations ` constructor and as the
57
- payload of a specific ` deliver ` call, which will be resolved with
58
- ` ResolverContext::Subscription ` . If you do not provide a separate
59
- ` Subscription ` object in the ` deliver ` call, it will fall back to delivering a
60
- new event resolved against the default
55
+ to implement the subscription.
56
+
57
+ You can provide separate implementations of the ` Subscription ` object as the
58
+ default in the ` Operations ` constructor and as the payload of a specific
59
+ ` deliver ` call. Whether you override the ` Subscription ` object or not, the
60
+ event payload for a ` deliver ` call will be resolved with
61
+ ` ResolverContext::Subscription ` .
61
62
62
63
## Delivering Subscription Updates
63
64
64
- There are currently three ` Request::deliver ` overrides you can choose from when
65
+ If you pass an empty ` std::shared_ptr<Object> ` for the ` subscriptionObject `
66
+ parameter, ` deliver ` will fall back to resolving the query against the default
67
+ ` Subscription ` object passed to the ` Request ` /` Operations ` constructor. If both
68
+ ` Subscription ` object parameters are empty, ` deliver ` will throw an exception.
69
+
70
+ There are currently five ` Request::deliver ` overrides you can choose from when
65
71
sending updates to any subscribed listeners. The first one is the simplest,
66
72
it will evaluate each subscribed query against the ` subscriptionObject `
67
73
parameter (which should match the ` Subscription ` type in the ` schema ` ). It will
0 commit comments