meteor-blaze-apollo-example's People
Forkers
rwatts3meteor-blaze-apollo-example's Issues
subscription.refetch is not a function
OS Win 7 32bit
meteor 1.4.2
FlowRouter 2.12.1
Hi,
I am using the Meteor Example App: Simple Todos as the start point for this app (proof of concept).
It works the first time I visit the url/path e.g. http://localhost:3000/jobs/27124
but everytime I do FlowRouter.go('/jobs/<jobId>)
to trigger another refresh. I get the error below.
Exception from Tracker recompute function:
debug.js:41 TypeError: subscription.refetch is not a function
at refetch (blaze-apollo.js:31)
at Blaze.View.<anonymous> (blaze-apollo.js:20)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:465)
at view.js:197
at Object.Blaze._withCurrentView (view.js:538)
at viewAutorun (view.js:196)
at Tracker.Computation._compute (tracker.js:311)
at Tracker.Computation._recompute (tracker.js:330)
at Object.Tracker._runFlush (tracker.js:495)
(There may be a few bugs I have not encountered in the code).
Sample code...
Template.Jobs_show_page.onCreated(function jobsShowPageOnCreated() {
this.getJobId = () => FlowRouter.getParam('_id');
const instance = Template.instance();
instance._id = new ReactiveVar(this.getJobId());
});
Template.Jobs_show_page.helpers({
jobIdArray() {
const instance = Template.instance();
const jobId = instance.getJobId();
instance._id.set(jobId);
return instance.findJob() ? [jobId] : [];
},
jobArgs(jobId) {
const instance = Template.instance();
// By finding the job with only the `_id` field set, we don't create a dependency on the
// `job.incompleteCount`, and avoid re-rendering the todos when it changes
const job = instance.findJob();
return {
todosReady: instance.subscriptionsReady(),
job() {
return instance.findJob().JOB;
},
};
},
job() {
return Template.instance().findJob().JOB;
}
});
Let me know if you can help or if you need more info.
Update
I have tracked down the issue to blaze-apollo#L31
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.