Last active
April 23, 2019 08:32
-
-
Save motephyr/c5ca650e1d19dfe8fddb5eb4a871efe7 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
const createLoader = require('../Helpers/loaders/createLoader') | |
/** | |
* Define your loaders here. | |
* Each key should be a valid | |
* instance of DataLoader. | |
*/ | |
const loaders = () => ({ | |
user_group: createLoader('App/Models/UserGroup'), | |
user_personal_data: createLoader('App/Models/PersonalData', 'user_id'), | |
user_posts: createLoader('App/Models/Post', 'user_id', 'many') | |
}) | |
module.exports = loaders |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment