I have an error in my client:
Exception in template helper: TypeError: Template.instance(...).gqlQuery is not a function
Below my code:
import './directors.html';
import gql from 'graphql-tag';
const MY_QUERY = gql`{
getDirectors {
label
hostname
ip
}
}`
Template.directors.helpers({
directors() {
return Template.instance()
.gqlQuery({
query: MY_QUERY
})
.get();
}
});
I have an error in my client:
Exception in template helper: TypeError: Template.instance(...).gqlQuery is not a function
Below my code: