Skip to content

Instantly share code, notes, and snippets.

@dabit3
Created October 20, 2016 05:50
Show Gist options
  • Save dabit3/59f98f1221fdba4853178664e9c34744 to your computer and use it in GitHub Desktop.
Save dabit3/59f98f1221fdba4853178664e9c34744 to your computer and use it in GitHub Desktop.
Apollo Tutorial - Connector
const PresidentModel = require('./model');
class President {
constructor() {
this.findPresident = (name) => {
const person = PresidentModel.findOne({ name }, (error, data) => {
return data;
});
return person;
};
}
}
module.exports = { President };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment