meteor - Apollo subscription with graph.cool and Algolia -


now have meteor app mongodb geo-indexes.

and i'm using kind of pub/sub:

 meteor.publish('items', function itemspublication(nelat, nelong, swlat, swlong) {    return items.find({     $and: [         {             'till': {                 $gte: new date()             }         },         {             'o': { $geowithin: { $box: [ [ swlong,swlat], [ nelong, nelat] ] }  }         }      ]    }, {      fields: {         o: 1,         t: 1,      }    }) }) 

and add indexes, example:

item._ensureindex({     'till':1, 'o': '2dsphere'  }) 

everything working fine...

the main question is: possible change meteor pub/sub + mongodb geo-indexes apollo subs + graph.cool backend + algolia super fast geo searching?

i need real reactivity without polling or else...

graphcool doesn't natively support spatial queries. reason won't able reactive experience used meteor , graphcool supports other data types. have open feature request this, , when merged graphcool on par apollo in regard.

that said, here's how can implement workaround algolia while wait native support:

1) set algolia integration geo queries described here https://www.graph.cool/docs/tutorials/algolia-auto-syncing-for-graphql-backends-aroozee9zu/#algolia-geosearch

2) set graphql subscription listening create, update, delete events model interested in

3) when events received, query algolia index latest result


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -