File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { autoResetDataIn30min } from './wrappers/autoResetDataIn30min';
2323import { seedByName } from '../../scripts/seedHelpers' ;
2424import { FunctifiedAsync } from './FunctifiedAsync' ;
2525
26+ // see more PubSubs here https://www.apollographql.com/docs/apollo-server/data/subscriptions/#pubsub-implementations
2627const pubsub = new PubSub ( ) ;
2728
2829const ViewerTC = schemaComposer . getOrCreateOTC ( 'Viewer' ) ;
@@ -128,6 +129,8 @@ schemaComposer.Subscription.addFields({
128129 orderUpdated : {
129130 type : OrderTC ,
130131 // way 2: load Order in AsyncIterator
132+ // in same manner you may use `withFilter` helper:
133+ // https://www.apollographql.com/docs/apollo-server/data/subscriptions/#subscription-filters
131134 resolve : ( order ) => order ,
132135 subscribe : ( ) =>
133136 FunctifiedAsync . map ( pubsub . asyncIterator ( [ 'ORDER_UPDATED' ] ) , ( _id ) => {
You can’t perform that action at this time.
0 commit comments