Last active
March 28, 2017 09:46
-
-
Save zapkub/d6081b71f699a7d6de70a5fceb59957e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Resolver({ | |
resolve: async () => { | |
return new Promise((rs, rj) => { | |
Model.find({ _id }, function(err, result){ | |
rs(result); | |
}); | |
}) | |
} | |
// or use await | |
resolve: async () => { | |
const result = await Model.find({ _id }); | |
return result; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment