mirror of
https://github.com/vale981/grapher
synced 2025-03-04 17:11:38 -05:00
Add subscriptionContext to benefit the goodies of blazes onCreated.
This commit is contained in:
parent
2a99080d94
commit
43008c63a2
1 changed files with 3 additions and 2 deletions
|
@ -13,14 +13,15 @@ export default class extends Base {
|
|||
* Subscribe
|
||||
*
|
||||
* @param callback
|
||||
* @param subscriptionContext
|
||||
* @returns {null|any|*}
|
||||
*/
|
||||
subscribe(callback) {
|
||||
subscribe(callback, subscriptionContext = Meteor) {
|
||||
if (this.isResolver) {
|
||||
throw new Meteor.Error('not-allowed', `You cannot subscribe to a resolver query`);
|
||||
}
|
||||
|
||||
this.subscriptionHandle = Meteor.subscribe(
|
||||
this.subscriptionHandle = subscriptionContext.subscribe(
|
||||
this.name,
|
||||
this.params,
|
||||
callback
|
||||
|
|
Loading…
Add table
Reference in a new issue