mirror of
https://github.com/strapi/strapi.git
synced 2025-07-28 11:30:21 +00:00
20 lines
419 B
JavaScript
20 lines
419 B
JavaScript
'use strict';
|
|
|
|
const { omit } = require('lodash/fp');
|
|
|
|
module.exports = ({ strapi }) => ({
|
|
buildQueriesResolvers({ contentType }) {
|
|
const { uid } = contentType;
|
|
|
|
return {
|
|
async find(parent, args) {
|
|
return strapi.entityService.findMany(uid, args);
|
|
},
|
|
|
|
async findOne(parent, args) {
|
|
return strapi.entityService.findOne(uid, args.id, omit('id', args));
|
|
},
|
|
};
|
|
},
|
|
});
|