mirror of
https://github.com/strapi/strapi.git
synced 2025-07-31 12:55:08 +00:00
20 lines
439 B
JavaScript
20 lines
439 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.find(uid, { params: args });
|
|
},
|
|
|
|
async findOne(parent, args) {
|
|
return strapi.entityService.findOne(uid, args.id, { params: omit('id', args) });
|
|
},
|
|
};
|
|
},
|
|
});
|